Results 1 to 3 of 3
  1. #1
    asai is offline Senior Member
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    115
    Rep Power
    0

    Default Add a row in a JTable

    Hi,

    I am trying to write a code that makes the user able to add a new row to a table.
    I have read some forum posts on the subject, but for some reason the code examples does not work.

    This line:
    Java Code:
    model.insertRow(i,new Object[]{"",""});
    the error is that insertRow: "Cannot find symbol" .
    What could be missing?

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default Re: Add a row in a JTable

    Print the full message, as that will tell you what it can't find.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    asai is offline Senior Member
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    115
    Rep Power
    0

    Default Re: Add a row in a JTable

    Sorry my bad... I found the error... The method was not declared.

Similar Threads

  1. Jtable inside Jtable
    By anchitanc in forum AWT / Swing
    Replies: 5
    Last Post: 05-26-2012, 08:10 PM
  2. Replies: 4
    Last Post: 04-02-2012, 07:57 PM
  3. Using Jtable
    By lemontree45 in forum New To Java
    Replies: 6
    Last Post: 09-05-2011, 05:27 PM
  4. Adding New JTable in JTable
    By anilkumar_vist in forum New To Java
    Replies: 0
    Last Post: 01-27-2010, 08:27 AM
  5. Replies: 2
    Last Post: 05-15-2008, 10:15 AM

Posting Permissions

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