JTable sort by date
<p>I have a <strong>JTable</strong> with two columns, <strong>fileName</strong> and <strong>date modified</strong>. I have added name <strong>String</strong> for the first column and added <code>new Date(tempFile.lastModified())</code> for the second dateTime column. </p>

<p>I rendered the dateTime column as a <code>new SimpleDateFormat("MM/dd/yy HH:mm:ss")</code> String.</p>

<p>I also enabled the  <code>m_listTbl.setAutoCreateRowSorter(true);</code></p>

<p>But the sort result in the <strong>date modified</strong> column is not right.</p>

<p><img src="http://i.stack.imgur.com/XmaHg.jpg" alt="enter image description here"></p>

<p>Why is this? Do I still need to write my own sorter?</p>

<p><strong>EDIT:</strong></p>

<p>After commented out almost all extra code and not rendered by date String, I got the following result. It seems in JTable Java sort <strong>Date</strong> object by <strong>day</strong> by default. I will test more to see what's wrong with my code.
<img src="http://i.stack.imgur.com/BCiEp.jpg" alt="enter image description here"></p>

<p><strong>EDIT2</strong></p>

<p>I have tested and figured out. If you use DefaultTableModel without Override its getColumnClass() method, you will have trouble with Date or number columns.</p>
