I'd favor Collections.sort() rather than a SortedSet, as rows may or may not contain duplicate values; we don't necessarily care. And it sounds like you may want to sort on different columns. If you sort on column 1 and then on column 2, the column 1 sort is probably no longer valid; if you're holding on to a SortedSet representing that, you may well be in for confusion. Inside my TableModel I'd have a single List representing all the rows in their current order, and when you want to sort on a particular column, call Collections.sort(List, Comparator) using a Comparator that compares the particular column you wish to sort. Once you sort on column 2, the sort by column 1 is abandoned (unless/until you re-sort it by column 1 again). There are other wayt to do this, simpultaneously maintaining multiple TreeMaps for the various sort orders you may wish to deal with, but this will be somewhat more complex.
"I'm not back." - Bill Harding, Twister
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com