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...

JTextField
JTable
TableModel
TableCellRenderer
SortingJTableRows
JComboBox
CustomComboBoxModel
SwingWorkerThread
Send Email
Write To File
LDAP
Sort Your Objects
JTreeModel
DOSFileName

Please contact our Webmaster with questions or comments.
© Copyright 1998 Solutions Plus, Inc.  All rights reserved.

Home
About Us
Services
Contact Us
Hire Us!
Employment
Brochure
Site Index

Solutions Plus, Inc.

Internet Explorer 4.0 or higher

This page is best viewed with IE 4.0 or higher

Cast your vote!