Results 1 to 2 of 2
  1. #1
    Ambergahill is offline Member
    Join Date
    Nov 2010
    Posts
    22
    Rep Power
    0

    Cool JTable is there, but not showing

    Hello, I have a JTable that I populate, but nothing shows up in the table on the screen. If I check individual cells with debugging println statements, the data is there, it just does not show up.

    Java Code:
            //Data is stored, create table now
            JTable theTable = new JTable(tableRows, headers);
            tblRoomTable = theTable;
            System.out.println("Row data: " +  tblRoomTable.getModel().getValueAt(0, 0));
            tblRoomTable.repaint();
    This is hard because I need to do this without calling any non-static methods. I am working in a static function because a Thread's run method is kicking this table populating off and the run method is static. Thanks for any help you can provide.

  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 Ambergahill View Post
    Hello, I have a JTable that I populate, but nothing shows up in the table on the screen. If I check individual cells with debugging println statements, the data is there, it just does not show up.

    Java Code:
            //Data is stored, create table now
            JTable theTable = new JTable(tableRows, headers);
            tblRoomTable = theTable;
            System.out.println("Row data: " +  tblRoomTable.getModel().getValueAt(0, 0));
            tblRoomTable.repaint();
    We'll be able to give you much better help if you can create and post a small compilable, runnable program that shows your problem, an SSCCE. Please check the link before creating this for important details.


    This is hard because I need to do this without calling any non-static methods. I am working in a static function because a Thread's run method is kicking this table populating off and the run method is static. Thanks for any help you can provide.
    Sorry, but this makes no sense to me.

Similar Threads

  1. showing page
    By ighor10 in forum New To Java
    Replies: 1
    Last Post: 08-26-2010, 03:03 PM
  2. showing records in Jtable
    By Shivraj in forum NetBeans
    Replies: 0
    Last Post: 03-21-2009, 07:16 AM
  3. Showing
    By bostonstate in forum New To Java
    Replies: 3
    Last Post: 08-25-2008, 07:49 PM
  4. Replies: 2
    Last Post: 05-15-2008, 10:15 AM
  5. Why isn't this showing?
    By JToolTip in forum Java Applets
    Replies: 2
    Last Post: 07-07-2007, 11:54 PM

Tags for this Thread

Posting Permissions

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