File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes JTable... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable..." Watch "JTable..." New topic


Tris Rabar
Ranch Hand

Joined: Feb 27, 2002
Posts: 72
I'm trying to create a JTable using a table model. In the model, I create the data by going through several enumerations and adding the values individually to an array, a 2D array. However, it does not seem to work. Can anyone explain to me what I may be doing wrong...maybe explain the TableModel approach...the code is really long, but it's posted on another post entitled "Why doesn't this JTable work??"
If you have any questions, feel free to ask.
Thanks for any help..!!

- Trish -
Joe Gilvary
Ranch Hand

Joined: May 11, 2001
Posts: 152
I suggested a possible solution to your code
problem in a reply to your previous post. It looks
to me like you lost a method somewhere along the line.
I have found some good material on JTable using
Google. Both Manning Publications Swing book
( and Apress's
Definitive Guide to Swing for Java 2 book
have online excerpts from their respective chapters
covering JTable.
I need a Swing book myself, and am considering both
of those.
Tris Rabar
Ranch Hand

Joined: Feb 27, 2002
Posts: 72
Thanks ever so much for your reply! I've been trying to get through this problem for a while and it's getting to me now! Because it's my first attempt at a JTable, I was not sure if what I did was right...I thought it was but when I got the errors...oh well!
Anyway, I will refer to the site you provided and see what I come up with. Thanks a lot for the suggestion!!
All your help very much appreciated.
I'll keep you posted!
I agree. Here's the link:
subject: JTable...
It's not a secret anymore!