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

John Zukowski

Like http://www.jguru.com/jguru/faq/view.jsp?EID=7927, 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.