JavaFX-8 - How to get the row count of a TableView?
Asked Answered
G

1

5

How is it possible to get the number of rows of a TableView in a TableCell? I tried .getTableRow(), but that isn't what I need. I need it to find out, if the TableCell is the last Cell in the TableView. Or is there another way to figure this out?

regards

Gramnegative answered 23/10, 2014 at 12:35 Comment(0)
G
27

Found the solution on my own. I'm very ashamed. :-)

getTableView().getItems().size()

That's it.

Gramnegative answered 23/10, 2014 at 12:37 Comment(1)
getItems wasn't easy for me to find either :-( looking for getRows() or getRowModel() or getRowCollection().Childress

© 2022 - 2024 — McMap. All rights reserved.