Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Keeping row selected when JTable is sorted  RSS feed

 
Roy Mallard
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using TableSorter.java, which works great, but when I sort a column any selected rows become deselected. What is the easiest way to keep them selected? Any help is appreciated.
 
Don Kiddick
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need a way of identifying a row. Then you can do :



You oof course will need to write getRowId() and findMatchingRow() but this should be simple.

D.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!