• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Row selections after sorting

 
Mi Chu
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having issues with keeping the row selection after sorting the data. That is, if I select result1 in row1 and sort the column, I still have row1 selected, but some other result, say result8 is in that row. How do I keep that selection locked to the result, instead of row?

Row selection


Sort method


I tried
&
but, this doesnt work.
 
Rob Camick
Ranch Hand
Posts: 2476
8
  • 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't attempt to manage this yourself. The built in JTable support will manage this for you.

Read the section from the Swing tutorial on Sorting and Filtering for a working example.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic