I\'ve figured out how to get a JTable to be sorted properly, but I can\'t figure out how to get it to automatically update the sort order when a table cell is c
Since the table model wraps your collection it has to be sortable. That means that your object (row) has to implement Comparable interface so collection can be properly sorted.
In your setValueAt method you have to to update appropriate attribute and resort the collection using Collections.sort. Then, obviously, you have to call fireTableDataChanged to let table know that it needs to redraw.
Same thing suppose to happen on adding data.
When data is removed you don't have to resort, but still have to fireTableDataChanged
If your collection is to big, you may think about adding data to appropriate place initially instead of resorting.