This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Java in General 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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "JTable" Watch "JTable" New topic


Richard Larocque

Joined: May 10, 2001
Posts: 6
I've been trying to get a JTable to appear. Unfortunately only a blank screen appears. I have 6 records in my test database. When I checked my dataModel with getRowCount and getColumnCount, it does show my 6 records and my 6 columns. What am I missing?
Enclosed is a copy of my code.

[Added [ code ] tags and disabled smilies for clarity - Jim]

[This message has been edited by Jim Yingst (edited May 10, 2001).]
David Freels
Ranch Hand

Joined: Feb 01, 2001
Posts: 102
Try adding your JTable to a JPanel and add the JPanel to the JScrollPane.
Richard Larocque

Joined: May 10, 2001
Posts: 6
Added JTable to JPanel and then JPanel to JScrollPane. Exactly the same results.
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
If you want to get answers from the people that really know Swing, you should probably look in the Swing forum. I'm moving this thread there.
I agree. Here's the link:
subject: JTable
It's not a secret anymore!