I have a JTable which is 9 by 3 (27 cells), but if the user clicks on a button I want the table to change, being filled with not only new data, but possibly a different number of cells. I am not sure how to do this.
I've tried removing the table from the parent and creating a new instance of the table. Nothing happened. Here:
somepanel.remove(thetable);
JTable newtable = new JTable(datainavector,columntitles);
I want to know how I can either
a) delete a table from a panel and "Put it back in" with a different shape or b)change the contents (and possibly shape) of a table.