question: public void addColumn ( String header ) { if ( getModel ( ) instanceof DefaultTableModel ) { DefaultTableModel model = ( DefaultTableModel ) getModel ( ) ; model . addColumn ( Util . cleanAmp ( header ) ) ; } else throw new IllegalArgumentException ( "Model must be instance of DefaultTableModel" ) ; }
target:  Add Table Column. after adding a column, you need to set the column classes again (DefaultTableModel fires TableStructureChanged, which calls JTable.tableChanged .. createDefaultColumnsFromModel