|
-
August 13th, 1999, 02:30 PM
#1
How do you ADD and Delete Rows in a JTABLE in JDK1.2.2?
I have a table that is filled using a the (Vector, Vector) constructor. I need the ability to add and delete rows in the table while it is displayed. Basically it is so users can add new datasets, and remove chosen rows. I only saw API's for adding columns. Any examples would be great...
Thanks,
Jay
-
August 17th, 1999, 02:45 AM
#2
Re: How do you ADD and Delete Rows in a JTABLE in JDK1.2.2?
Just set a TableModel for your JTable and use DefaultTableModel as your TableModel. In your Def
-
February 8th, 2000, 01:19 AM
#3
Re: How do you ADD and Delete Rows in a JTABLE in JDK1.2.2?
use the DefaultTableModel as the tablemodel
and use removeRow(int RowNumber) to remove a particular row and
addRow(Object) to add a row at the end.
if u want to remove all the rows, use setRowNum(0) using the underlying TableModel instance.
plz rate the solutions so that ppl get encouraged to respond to questions.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|