Results 1 to 3 of 3
  1. #1
    javanew is offline Member
    Join Date
    Mar 2010
    Posts
    49
    Rep Power
    0

    Default delete a row from jtable

    Please help..
    i am using netbeans,, i have made a jtable, and there are rows there
    i want to click on a row and press delete so that it is removed from jtable.
    Using netbeans is difficult,,
    i dont know what model did netbeans specify.
    please help me with details!

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,202
    Rep Power
    19

    Default

    Read the API for JTable and follow the link to the Swing tutorial on How to Use Tables.

    Learn how to code a Swing GUI before tackling the NetBeans visual designer, which is NOT a beginners' tool.

    db

  3. #3
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,234
    Rep Power
    7

    Default

    Instead of creating a custom TableModel you will want to use the DefaultTableModel so you can invoke the removeRow(...) method when the delete button is clicked.

Similar Threads

  1. Replies: 2
    Last Post: 04-20-2009, 08:00 AM
  2. help to delete
    By andykots in forum Advanced Java
    Replies: 1
    Last Post: 01-29-2009, 08:29 AM
  3. Delete
    By Sarinam in forum New To Java
    Replies: 6
    Last Post: 07-23-2008, 11:09 AM
  4. Replies: 2
    Last Post: 05-15-2008, 10:15 AM
  5. Listbox Add/Delete
    By Rageagainst20 in forum New To Java
    Replies: 2
    Last Post: 04-16-2008, 04:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •