title: JTable + sorting column, but row is not sorted
body: <p>I have created a JTable, the table contains 4 rows, and for a specific row, I have overridden the sorting and its working fine only on that column.</p>
  
  <pre><code>Status  Scheduled Date  Scheduled time  Status          
  false   30/01/2012  02:00:00    Scheduled   
  false   29/01/2012  14:58:00    Scheduled   
  false   29/01/2012  15:50:00    Scheduled   
  </code></pre>
  
  <p>For Scheduled Date, which I try to sort, it would sort, but the respecitve rows are not being updated.</p>
  
  <p>Here is my code for sorting</p>
  
  <pre><code>public static void sortColumn(DefaultTableModel model, int colIndex,
              boolean sortingOrder) {
  
          Vector&lt;?&gt; data = model.getDataVector();
          Object[] colData = new Object[model.getRowCount()];
          SortedSet&lt;Object&gt; dataCollected = null;
          List&lt;Date&gt; dateCollected;
          boolean dateFlag = false;
  
          dateCollected = new ArrayList&lt;Date&gt;();
  
          // Copy the column data in an array
          for (int i = 0; i &lt; colData.length; i++) {
  
              Object tempData = ((Vector&lt;?&gt;) data.get(i)).get(colIndex);
  
              if ((colIndex == 1 || colIndex == 4)
                      &amp;&amp; tempData.toString().contains("/")) {
                  String[] _scheduledDate1 = ((String) tempData).split("/");
                  Calendar _cal1 = Calendar.getInstance();
                  _cal1.set(Integer.parseInt(_scheduledDate1[2]),
                          Integer.parseInt(_scheduledDate1[1]) - 1,
                          Integer.parseInt(_scheduledDate1[0]));
  
                  dateCollected.add(_cal1.getTime());
                  dateFlag = true;
              } else {
                  colData[i] = ((Vector&lt;?&gt;) data.get(i)).get(colIndex);
              }
          }
  
          // DateCompare compare = new DateCompare();
          if (!dateFlag) {
              dataCollected = new TreeSet&lt;Object&gt;();
  
              dataCollected.add(colData);
  
              dateFlag = false;
          }
  
          // Copy the sorted values back into the table model
          if ((colIndex == 1 || colIndex == 4) &amp;&amp; dateFlag) {
              SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
              sortOrder = !sortOrder;
  
              if (sortOrder) {
                  Collections.sort(dateCollected);
              } else {
                  Collections.sort(dateCollected, Collections.reverseOrder());
              }
  
              colData = dateCollected.toArray();
              for (int i = 0; i &lt; colData.length; i++) {
                  ((Vector&lt;Object&gt;) data.get(i)).set(colIndex,
                          sdf.format(((Date) colData[i]).getTime()));
              }
          } else {
              for (int i = 0; i &lt; colData.length; i++) {
                  ((Vector&lt;Object&gt;) data.get(i)).set(colIndex, colData[i]);
              }
          }
  
          model.fireTableStructureChanged();
      }
  </code></pre>
  
  <p>How to I get the entire row update accordingly?</p>