Thread: sorting JTable
View Single Post
  #3 (permalink)  
Old 07-18-2007, 09:26 AM
mansi_3001 mansi_3001 is offline
Member
 
Join Date: Jul 2007
Posts: 2
mansi_3001 is on a distinguished road
hiii...i have already done this..i.e.i hav used the examples from sun java.TableSorter is the class which uses TableMap.as such the demo at sun is workingfine but whn i trid to implement that in my model then sorting is not taking place.i hav implemented the sorting in MyTableApp and the class MyTabModel is extending the AbstractTableModel.but problem is still not resolved
myTable = new JTable(tm);

/*MyTabModel myModel = new MyTabModel();*/
TableSorter sorter = new TableSorter(tm);
sorter.addMouseListenerToHeaderInTable(myTable);
Reply With Quote