Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: AbstractTableModel - Adding rows

  1. #1
    Junior Member
    Join Date
    Apr 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default AbstractTableModel - Adding rows

    Hello,

    I cannot figure out how I can add a new row to my AbstractTableModel, I am using a JDialog with a few textfields as input method.


    I am getting the variables from the user, however I need a way to add the text into an AbstractTableModel.

     
    Note n = new Note();
    n.setFag(FagTextField.getText());
    n.setFilnavn(FilnavnTextField.getText());
    n.setNote(NoteTextField.getText());



    Thanks in advance!


  2. #2
    Senior Member PhHein's Avatar
    Join Date
    Mar 2013
    Location
    Germany
    Posts
    584
    My Mood
    Sleepy
    Thanks
    10
    Thanked 87 Times in 80 Posts

    Default Re: AbstractTableModel - Adding rows

    This tutorial is quite good, have a look at the examples: How to Use Tables

Similar Threads

  1. AbstractTableModel
    By beruska in forum AWT / Java Swing
    Replies: 1
    Last Post: October 25th, 2011, 12:33 PM
  2. Custom Table using AbstractTableModel
    By dumb_terminal in forum AWT / Java Swing
    Replies: 11
    Last Post: November 16th, 2010, 09:02 AM
  3. Difference between Arraylist and Vector in abstractTableModel ?
    By riddhik84 in forum Collections and Generics
    Replies: 2
    Last Post: November 7th, 2009, 03:22 PM
  4. Need a loop for rows and columns
    By Ceasar in forum Loops & Control Statements
    Replies: 8
    Last Post: October 9th, 2009, 05:47 PM
  5. adding rows to coloumns. Netbeans
    By haygaurav in forum Java IDEs
    Replies: 1
    Last Post: April 1st, 2009, 03:16 PM