title: How to subclass DefaultTableModel and change its dataVector
body: <p>I want to extend the DefaultTableModel and change its dataVector.
  I want to make the dataVector to show only specific fields of DataHolder in the column:</p>
  
  <pre><code> public class MyTableModel extends DefaultTableModel {
  
      /**
       * The data vector
       */
      private Vector&lt;DataHolder&gt;   dataVector_;
  
      //overridden method to add row in the table model
      public void addRow(DataHolder rowData) {
          insertRow(getRowCount(), rowData);
      }
  
      public void insertRow(int row, DataHolder rowData) {
              dataVector_.insertElementAt(rowData, row);
              fireTableRowsInserted(row, row);
          }
  
      ...} //end of MyTableModel
  
  
  
     class DataHolder{
       private int age;
       private int year;
       private int month;
       private int day;
      }
  </code></pre>
  
  <p>How can i display specific DataHolder fields in my jtable? My table has 3 columns for month, day, and year.</p>