when i click the 'Price' radiobutton it sorts the Price Row but in this order
how can i fix it? im still new in java. please help me. thanks. :D
rdbtnNewRadioButton_2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
DefaultRowSorter sorter = ((DefaultRowSorter)table.getRowSorter());
List <RowSorter.SortKey> sortKeys = new ArrayList<RowSorter.SortKey>();
sortKeys.add(new RowSorter.SortKey(4, SortOrder.ASCENDING));
sorter.setSortKeys(sortKeys);
}
});
override getColumnClass
in your XxxTableModel
, default class is String
, the your result from RowSorter
is correct
use Integer.Class