In JIDE- Jtable - how to get the actual row index (if the table is sorted row id is changing)
posted 5 years ago
I have implemented jtable using JIDE, my requirement is I have to select the row as soon as I add a row to the jtable. For this I am getting the current row count and passing that value to select the row. But when i sort the jtable the selection is going wrong. So for this I need the actual row index . Can anyone please help how to achieve this requirement using JIde jtable.
JTable has two methods for converting the table's indexing to the model's indexing (convertColumnIndexToModel and convertRowIndexToModel), and two for converting the other way around (convertColumnIndexToView and convertRowIndexToView).