File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Row selections after sorting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Row selections after sorting " Watch "Row selections after sorting " New topic
Author

Row selections after sorting

Mithun Chennuru
Greenhorn

Joined: Dec 17, 2013
Posts: 13
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

Joined: Jun 13, 2009
Posts: 2182
    
    7
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
 
subject: Row selections after sorting