Possible Duplicate:
Adding rows to a JTable
I am creating a jTable. Initially it has no rows.If we click "add" button a new row will insert.Is it possible to do this in a jTable?
Update your underlying TableModel
and fire the appropriate event. Or, if you use an extension of DefaultTableModel
, use the addRow
method.
Consult the table tutorial for more information.