How to get a hidden cell in JTable during multiple selection

I have a JTable with 10 lines. If I have several choices on JTable , how do I get the cell that is currently focused?

I tried using JTable getEditingColumn() and getEditingRow() , but they always return -1 during multiple selection.

+8
java swing jtable
source share
1 answer

Teams

 table.getSelectionModel().getLeadSelectionIndex(); table.getColumnModel().getSelectionModel().getLeadSelectionIndex(); 

enter row and column respectively.

+10
source share

Source: https://habr.com/ru/post/651036/


All Articles