Is it possible to disable manual sorting on a JTable after adding a sorter? So I have a JTable that has the following sorter attached to it (basically sorts by column 3 when the table is initialised):
JTable jTable = new JTable();
RowSorter<TableModel> sorter = new TableRowSorter<TableModel>(jTable.getModel());
List<RowSorter.SortKey> sortKeys = new ArrayList<RowSorter.SortKey>();
sortKeys.add(new RowSorter.SortKey(3, SortOrder.DESCENDING));
sorter.setSortKeys(sortKeys);
jTable.setRowSorter(sorter);
This works fine, however the user is still able to click on the column headers in the table and sort by any of the columns, which I want to disable. Is this possible?