wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Dynamically adding columns and rows to JTable using AbstractTableModel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Dynamically adding columns and rows to JTable using AbstractTableModel" Watch "Dynamically adding columns and rows to JTable using AbstractTableModel" New topic
Author

Dynamically adding columns and rows to JTable using AbstractTableModel

Elizabeth Luckose
Ranch Hand

Joined: Aug 17, 2001
Posts: 32
Hi
I am using a table model which is extending an AbstractTableModel
for my JTable. I want to add columns and rows dynamically.
How can I add columns and rows dynamically using this table model?
Please help....
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
DefaultTableModel has methods for adding columns and rows. Otherwise you need to write them yourself.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Dynamically adding columns and rows to JTable using AbstractTableModel