Modifying a TableModel and updating the table
I am new to Swing, and have picked up a job to modify some Swing that draws a 2D table (a grid). I've added a form so the table configuration can be changed, which basically means that columns can be selected/de-selected.
I have the selection form working, and as I close this form with the OK button, I modify the Column Headers, which are stored in a Vector.
As I update the column headers I fire an fireTableStructureChanged(), which gets picked up by a TableModelListener in the class with my JTable. I then create a new TableModel object assigned to the same reference. The changed Column Headers should add only reqd. columns to the model.
I could do with some guidance as to what I need to do to get the JTable to work with the new Model.
(The code is a nightmare, so I'll spare you that pain, and be happy with just some guidance).
Any help is greatly appreciated.
Thanks

