Sorting Rows in your JTable
To sort the rows in your table, add the following to a constructor (or some init method) of GUI class which has a JTable.
TableSorter sorter = new TableSorter(aTableModel);
myTable.setModel(sorter);
sorter.addMouseListenerToHeaderInTable(myTable);
Submitted by Michael Pell
At a glance...
Please contact our Webmaster with questions or comments.
© Copyright 1998 Solutions Plus, Inc. All rights reserved.
This page is best viewed with IE 4.0 or higher
Cast your vote!