wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Sorting JTable in asc. or desc.? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Sorting JTable in asc. or desc.?" Watch "Sorting JTable in asc. or desc.?" New topic
Author

Sorting JTable in asc. or desc.?

Wickes Potgieter
Ranch Hand

Joined: Apr 05, 2002
Posts: 68
Is it necessary to provide the functionality of sorting the table data in ascending or descending when the user clicks the header of the column?


Wickes Potgieter<br />SCJP<br />BEA Certified Specialist: Server, Integration, Portal, Tuxedo<br />BEA WebLogic Server 7 Certified Enterprise Developer<br />BEA Certified Architect<br /><a href="http://www.bea.com" target="_blank" rel="nofollow">www.bea.com</a>
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Hi Wickes,
It is not a requirement and don't feel compelled to implement table sorting. Having said that I did implement table sorting in both ascending and descending order. If the user clicked on a column hearder, the table would sort in ascending order on that column. If he clicked on the same column again it would sort in descending order on that column. Additionally, I appended a "+" or "-" to the column header title to indicate on which column the table was sorted and in what direction.
Hope this helps,
Michael Morris


Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Wickes Potgieter
Ranch Hand

Joined: Apr 05, 2002
Posts: 68
Yes that helps, thank you Mike!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sorting JTable in asc. or desc.?
 
Similar Threads
javac not recognized as an internal or external command
How do I include a custom font in a NetBean project?
Multi Level Sorting
Error
Problem with Jar