How can I add cells to a Table Column when the user presses a button or chooses a menu item?

John Zukowski

Like, the answer depends on what table model you are using.

Also, the way the data model works with a JTable, is that you can't add cells, but you can add rows. To add rows using the DefaultTableModel, just call the addRow() or insertRow() method. addRow() adds at the end, insertRow() can add the row anywhere.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact