title: Java JTable: Setting a primary column to always sort by first
body: <p>I'm using a JTable with say 3 columns, displaying information about files and folders: </p>
  
  <p>Col1: Either "file" or "folder" (String)<br>
  Col2: Name of the file or folder (String)<br>
  Col3: Creation date (Timstamp)  </p>
  
  <p>I can easily sort the table by any column. But I'm not able to achieve the following desired behavior:</p>
  
  <p>No matter what column header the user clicks, folders should always display before files. So basically sorting by Col1 in any order other than descending should not be possible. Also, if sorted by Col3, any folders should still display before files, regardless of their timestamp.</p>
  
  <p>Any hint to how to do this is greatly appreciated.</p>
  
  <p>Yours</p>
  
  <p>Andreas</p>