• Post Reply Bookmark Topic Watch Topic
  • New Topic

In JIDE- Jtable - how to get the actual row index (if the table is sorted row id is changing)  RSS feed

 
srinath yala
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rob Spoor
Sheriff
Posts: 21052
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!