JSE 1.6.0 JTable RowSorter index problem when sort

I have a JTable and i磎 testing theRowSorter, new feature in SE 1.6 and after clik in the column header, the sort works fine, but when i select any row, for example row 5, i get the cell value ( ....jTable1.getValueAt(.... ) from the row that was in the position 5 before the sort. Seem that the table sorts but keeps the original indexs.

Any one know how to help... Thanks. Max.

Message was edited by:

maximilian.brasil

Message was edited by:

maximilian.brasil

Message was edited by:

maximilian.brasil

Message was edited by:

maximilian.brasil

[616 byte] By [maximilian.brasila] at [2007-11-27 0:17:06]
# 1
I believe you need to use RowSorter's convertRowIndexToModel() method like so:// sorter is a TableRowSorterjTable1.getValueAt(sorter.convertRowIndexToModel(jTable1.getSelectedRow()));
ignignokt84a at 2007-7-11 22:05:47 > top of Java-index,Java Essentials,Java Programming...
# 2
God save you ....Thanks for you help... it磗 working fine...max.
maximilian.brasila at 2007-7-11 22:05:47 > top of Java-index,Java Essentials,Java Programming...