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

S.Pro picture S.Pro · Oct 23, 2014 · Viewed 16.3k times · Source

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

Answer

S.Pro picture S.Pro · Oct 23, 2014

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

getTableView().getItems().size()

That's it.