title: How to get a DefaultTableModel object's data into a subclass of DefaultTableModel
body: <p>I have a jTable displaying a simple two column sql table's data and allowing a user to maintain the list. This is my first java program. Have that working such that user can edit the list of data and press save to update.
  I get the sql data to the jTable's DefaultTableModel from this line of code:</p>
  
  <pre><code>paCutAboveTable.SetTableModel((DefaultTableModel) DbUtils.resultSetToTableModel(rs));
  </code></pre>
  
  <p>I'm guessing DBUtils and resultSets are familiar to people here.
  I want to add a CheckBox to each row. Looking here and elsewhere I kept seeing to subclass DefaultTableModel in order to override a method thus:</p>
  
  <pre><code>/*
  
    * JTable uses this method to determine the default renderer/
    * editor for each cell.  If we didn't implement this method,
    * then the last column would contain text ("true"/"false"),
    * rather than a check box.
    */
  
   public Class getColumnClass(int c) {
  
       return getValueAt(0, c).getClass();
     }
  </code></pre>
  
  <p>However I can't figure how to get the output of DefaultTableModel from  resultSetToTableModel method to my subclass - the statement shown doesn't compile if the SetTableModel method is changed to accept the subclass as its parameter.
  Is there an easy way I'm missing?</p>