Results 1 to 4 of 4
  1. #1
    aibao is offline Member
    Join Date
    May 2011
    Posts
    4
    Rep Power
    0

    Default updating JTable in another frame after editing the data

    Please help me how to fix my code

    I have a frame, with a JTable on it, displaying a list of employees.
    I have a button to add and edit a selected employee on the list.
    WHen I click the Edit or Add buttons,edit the employee or add a new one, after clicking the Save button and going back to the previous JFrame with a JTAble, the data is not updated.

    What method can I use to update the data in the list?

    I have a database, the data are fetched from the DB.

    Please help, thanks! :)

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    What type of model does your JTable use? Is it a DefaultTableModel? If so, have you called the methods of the model such as addRow(...) to add a row? It's somewhat hard to know how to help you, to know what you're doing wrong if you don't show us the critical code.

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

    Default

    You didn't bother to reply to the two responses on your previous thread. Not the best way to continue to get help on a forum, that.

    And I guess you'll run away from this one too as soon as someone asks for an SSCCE.

    db

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. JTable font while editing cell
    By kbro3 in forum New To Java
    Replies: 2
    Last Post: 04-06-2011, 07:08 AM
  2. Programmatically starting cell editing in JTable
    By javaexplorer in forum AWT / Swing
    Replies: 2
    Last Post: 05-21-2010, 04:33 PM
  3. editing jTable then writing new values to database!
    By sweet angle in forum AWT / Swing
    Replies: 6
    Last Post: 01-27-2009, 05:07 PM
  4. JTable editing with Mouse
    By Gajesh Tripathi in forum AWT / Swing
    Replies: 0
    Last Post: 10-11-2008, 08:34 AM
  5. jTable Cell editing
    By mahaling_m in forum AWT / Swing
    Replies: 0
    Last Post: 06-23-2008, 08:17 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
  •