I have written a \"double-click\" event on my JTable
. My JTable, viz. myTaskTable is populated with a number of rows having multiple columns. I want the row ind
Get the row index using the event, not the table selection:
final int selectedRowIndex = table.rowAtPoint(mouseEvent.getPoint());
// If the rows are sorted or filtered
final int modelRowIndex = table.convertRowIndexToModel(selectedRowIndex);
getSelectedRow()
would not work with multiple selected rows (multiple selections allowed), as it will always return "the index of the first selected row".