I have developed a basic custom JTableModel as follows
public class CustomTableModel extends DefaultTableModel {
List data;
public CustomTable
...Even if I have the index, if the table is sorted, my model is not so sophisticated and will return the wrong object...
You have to use:
JTable.convertRowIndexToModel( int viewIndex )
Maps the index of the row in terms of the view to the underlying TableModel. If the contents of the model are not sorted the model and view indices are the same.
With that index you can access your table model and see what's the object you need.
Note Table sorting along with this method was introduced in Java 1.6