Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Adding columns dynamically to JTable problem  RSS feed

Daniel Roach
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a application based on a Jtable. A custom model class has been created by extending AbstractTableModel. Columns are created individually, from an input file, and then added to table. The Table is displayed in an JInternalFrame. I want to be able to add columns. I have added a menu, which adds the new data to the data model, but as AutoCreateColumnsFromModel is false, FireTableStructureChanged does not add in the new column. I have added a new TableColumn object to the table, but can't get the table to change. I have tried calling doLayut and repaint on the table but with no success. Does anyone have any suggestions?
Thanks in advance.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!