I am trying to arrange JTable
rows with one of the its column value.. it needs to the highest first and lowest last.. Please Help
I tried this code:
JTable reporttable = new JTable();
reporttable.setFillsViewportHeight(true);
reporttable.setCellSelectionEnabled(true);
reporttable.setSurrendersFocusOnKeystroke(true);
reporttable.setColumnSelectionAllowed(true);
reporttable.setBackground(new Color(255, 255, 255));
reporttable.getTableHeader().setFont(new Font("Times New Roman", Font.PLAIN, 10));
JScrollPane reportpane = new JScrollPane( reporttable);
reportpane.setViewportBorder(null);
TableRowSorter<TableModel> reportsorter = new TableRowSorter<TableModel>(allmodel);
reporttable.setRowSorter(reportsorter);
reportpanel.add(reportpane);
reporttable.setModel(allmodel);
reportpane.setBounds(20, 347, 817, 74);