JTable Sorting based on hidden column
问题 I would like to sort JTable rows based on one hidden column. Say I have a JTable like this column1 column2 val1 val2 Now I have a one more column3 which is hidden and I dont want to show. When user clicks on Column2 it should sort rows based on Column3 (hidden column) not based Column2. How to achieve this in JTable? 回答1: you can add by default TableRowSorter to JTable but there is RowSorter, nothing better and clear around as Darryl's Multisort Table Header Cell Renderer note definitions for