Reputation: 51029
If display simple TableView sample, then select first row, then press Ctrl
and then Down Arrow
button two times, we will see the following picture:
I.e. first row remains selected, while third row get cursor.
How to know this row?
Upvotes: 2
Views: 815
Reputation: 82461
This is the focused row. You can access that row via the focusModel
property:
int rowIndex = tableView.getFocusModel().getFocusedIndex();
The TableView.TableViewFocusModel
class used for focusModel
also supports some additional features like accessing the item for the focused row.
Upvotes: 3