Results 1 to 3 of 3

Thread: Jtable

  1. #1
    dhaivat is offline Member
    Join Date
    Feb 2010
    Posts
    9
    Rep Power
    0

    Default Jtable

    Hey
    I want to update JTable each time when user perform some action...
    In application I am creating new JTable each time....as well as new DefaultTableModel..Any Suggestion why Jtable is not displayed.....

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

    Default

    Quote Originally Posted by dhaivat View Post
    Hey
    I want to update JTable each time when user perform some action...
    In application I am creating new JTable each time....as well as new DefaultTableModel..Any Suggestion why Jtable is not displayed.....
    Based on what you have posted so far about all anyone can say is that you have a bug somewhere in your code.

    Best of luck!

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

    Default

    In application I am creating new JTable each time....
    Don't. Creating a new JTable will not cause it to be displayed on the GUI, it will just sit there in memory unless you add it back to the scrollpane.

    as well as new DefaultTableModel..
    Thats good, now the trick is to add the model to the existing table:

    Java Code:
    table.setModel( newlyCreatedModel );
    If you need more help post your SSCCE. In fact for all questions you should post a SSCCE.

Similar Threads

  1. Adding New JTable in JTable
    By anilkumar_vist in forum New To Java
    Replies: 0
    Last Post: 01-27-2010, 09:27 AM
  2. JTable
    By ivvgangadhar in forum AWT / Swing
    Replies: 1
    Last Post: 07-26-2009, 05:59 AM
  3. Row Name In Jtable
    By SANDY_INDIA in forum AWT / Swing
    Replies: 1
    Last Post: 08-16-2008, 01:23 AM
  4. Regarding JTable
    By adeeb in forum SWT / JFace
    Replies: 0
    Last Post: 06-18-2008, 07:13 PM
  5. Replies: 2
    Last Post: 05-15-2008, 11: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
  •