Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

TableSorter sorts entire table after single Insert

843810Nov 8 2004 — edited Nov 26 2005
TableSorter is a nice class that automagically sorts a JTables data. It even does multi-column sorts. This is very nice but there are a couple of problems. If you insert a record, TableSorter re-sorts all of the data. If you have a large number of rows in your table this becomes very inefficient. The same problem occurs with deletes. Deletes should be much simpler than the insert. Anyway, this sucks. Now I have to beat my head against a wall and figure out how to change TableSorter to handle single row inserts. Has anyone else fixed this problem? I was thinking about using a binary search to find the insert position. Any help is greatly appreciated.

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 24 2005
Added on Nov 8 2004
3 comments
125 views