#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2010
    Posts
    55
    Rep Power
    9

    Help with JTable


    Hi everybody... i'm developing a project and I need to make tables... so I started to look for information about them, and I been reading this

    http://download.oracle.com/javase/tutorial/uiswing/components/table.html#data

    but I can't make the table work, because i need a 30x30 table added to a JScrollBar, and when i run, nothing is displayed. I need to create a Table Model, because it has some advantages over the Simple Table.
    Obviously I am making my code wrong, so i need your help
    I need that table to be in a JPanel, and if someone can give me some ideas or advices, i will be very thankful.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    485
    Rep Power
    108
    Post your code. So that we can see what is going on.

    Comments on this post

    • jzd agrees
  4. #3
  5. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2007
    Posts
    1,939
    Rep Power
    3122
    When you post it make sure you just post a SSCCE.

    It sounds like you might have several issues. Try to get one thing working at a time. Like just the 30x30 table, then the scrollbar, then the table model.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2010
    Posts
    55
    Rep Power
    9
    i will start saying that i'm completely new in java -so don't laugh of me.. xD-

    so... i have to make a program similar to excel, and that's why i need the table, but for what you said, i understand that i have to make a table besides the Jtable??
    and that table, how should i do it?? with JtextField?? or is an object?? (object[][] object=new...)
    i have to explain that the info will be entered by the user to that table, so the cells must be empty at first. i hope i'm focusing this right.

    i will apreciate any help.
  8. #5
  9. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2007
    Posts
    1,939
    Rep Power
    3122
    No, just use a JTable. Start simple and get a piece working on the next instead of trying to do everything at once.

IMN logo majestic logo threadwatch logo seochat tools logo