I have JTableand TableRowSorterwhich I would like to perform after surgery after . I am browsing the web and still have no luck.
Initially, I thought it would just RowSorterListenerperform the trick, but unfortunately it does not perform the operation after the sorting is complete.
Adding a header MouseListenerto JTablemay work, but the solution is not very elegant.
Does anyone have any ideas?
Thanks a bunch!
Change (of comments): In a method within a custom class TableModelis added as follows: AbstractTableModel. This method is called whenever JTableset / specified in a user class TableModel.
sorter.addRowSorterListener(new RowSorterListener() {
@Override public void sorterChanged(RowSorterEvent rowsorterevent) {
rebuildMItems();
}
});