Move down empty rows when using RowSorter.SortKey on JTable

67 Views Asked by At

I'm trying to use JTable to show data from excel files.

I'm using RowSorter.SortKey, so I can order many columns:

 for(int i = 0; i < x; i++){                    
   sortKeys.add(new RowSorter.SortKey(i,  order));
 }

 sorter.setSortKeys(sortKeys);           
 sorter.sort();

The problem is that the empty rows are put at the top during ascending order. Is there way to keep using the JTable sorting function but moving empty rows at the end of the JTable?

Thank you P.S.: I'm new to java swing.

0

There are 0 best solutions below