I want to find out at whih row of JTable the user clicked.
How to do it ?
I want to find out at whih row of JTable the user clicked.
How to do it ?
If you only ever care about listening to selections on the JTable:
jTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
int sel = jTable.getSelectedRow();
}
});