Forums Register Login

Sorting on 3 fields and want to only reset 1

+Pie Number of slices to send: Send
Currently sorting my JTable on 3 different columns.
Able to reset all sorting columns by setting my sorter to null, but really just want to reset the 3rd column used for sorting so that only two columns are used instead of 3.
Is there a way to "unset" a specific column from the list of sorting columns?
+Pie Number of slices to send: Send
Check out the DefaultRowSorter class.

You should be able to use the getSortKeys() method, remove the last item in the List and then use the setSortKeys() method.
+Pie Number of slices to send: Send
Thanks for taking the time to reply, but by the time i went to research the info for this it became a moot point as I didn't need it anymore. ;-)
I will definitely play around with it as time permits.

The fastest and most reliable components of any system are those that are not there. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 533 times.
Similar Threads
How to allow sorting of table?
Issue with tomahawk's sorting feature with hyperlink contents
Icon needed in JTableHeader for Sorting
Validating file extension problem
How To Sort Multiple Columns
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 06:59:37.