CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    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


  2. #2
    Guest

    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

  3. #3
    Join Date
    Jan 2000
    Posts
    39

    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
  •  





Click Here to Expand Forum to Full Width

Featured