Results 1 to 6 of 6
  1. #1
    pink123 is offline Member
    Join Date
    Feb 2011
    Posts
    84
    Rep Power
    0

    Default Data not refreshing in Jtable

    Hi,

    I am trying to refresh my Jtable with the new data.The data is fetched correctly but is not displayed in the Jtable.My jtable still shows the old data.
    I have initiated a new object for my table model and then set it as well.
    Can some one plese help what could be the issue?

    Thanks,

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

    Default

    Java Code:
    table.setModel( theNewModel );
    Thats all that is required, assuming you create the new model properly.

  3. #3
    pink123 is offline Member
    Join Date
    Feb 2011
    Posts
    84
    Rep Power
    0

    Default

    Thanks for the reply
    I have done that but still its not refreshing.and checked that the model is also set properly.

    Thanks,

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

    Default

    Then you don't have a proper reference to the table that you are trying to update. Maybe you hava class and local variable of the same name. Maybe you created two tables and only added one to the GUI.

    If you need more help then post your SSCCE that demonstrates the problem.

  5. #5
    pink123 is offline Member
    Join Date
    Feb 2011
    Posts
    84
    Rep Power
    0

    Default

    Thanks for your help but my issue is still not solved.
    Screen 1 shows a table with 100s of record.There is a search button clicking on search button opens a dialog box and I can search for records on screen 1when a record is searched the new record is not showing up its still showing those 100 records.

    I cannot post the code bcoz of security reasons...

    Thanks,

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

    Default

    I cannot post the code bcoz of security reasons...
    I did not ask for your real code. I asked for a SSCCE. If you don't want to post a SSCCE then I guess you don't want any help.

Similar Threads

  1. Refreshing Jtable once again...
    By Norther in forum AWT / Swing
    Replies: 2
    Last Post: 06-29-2010, 07:46 PM
  2. Update JTable data
    By DC200 in forum AWT / Swing
    Replies: 8
    Last Post: 03-30-2010, 10:10 PM
  3. how to retrieve data from other jtable..
    By javanewbie2010 in forum AWT / Swing
    Replies: 1
    Last Post: 02-12-2010, 08:32 AM
  4. Save JTable Data
    By anilkumar_vist in forum New To Java
    Replies: 0
    Last Post: 02-08-2010, 12:11 PM
  5. how to refresh data of the JTable
    By paty in forum JDBC
    Replies: 3
    Last Post: 08-17-2008, 12:01 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
  •