title: JTable Data Refresh Issue
body: <p>I want to refresh the JTable data by clicking a button.</p>
  
  <p>The problem is that the old data in the JTable can't be removed and the new data are just added into the table. I tried below ways to remove the old data but none of them works.</p>
  
  <pre><code>1. table.setModel(new DefaultTableModel());
  2. ((DefaultTableModel)table.getModel()).setRowCount(0);
  3. ((DefaultTableModel)table.getModel()).fireTableDataChanged();
  4. ((DefaultTableModel)table.getModel()).getDataVector().removeAllElements();
  5. table.repaint();
  6. model = (DefaultTableModel)table.getModel();
     while(model.getRowCount() &gt; 0) {
         model.removeRow(0);
     }
  </code></pre>