This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable" Watch "JTable" New topic
Author

JTable

Richard Larocque
Greenhorn

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
Greenhorn

Joined: May 10, 2001
Posts: 6
Added JTable to JPanel and then JPanel to JScrollPane. Exactly the same results.
Anonymous
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.
jeremy hull
Greenhorn

Joined: Jan 18, 2001
Posts: 10
Your table should be added directly to a JScrollPane.
jeremy hull
Greenhorn

Joined: Jan 18, 2001
Posts: 10
You did the scrollPane part right, did you try a default table model?
Richard Larocque
Greenhorn

Joined: May 10, 2001
Posts: 6
No,
I am trying to learn how to build my own Table model.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTable
 
Similar Threads
JTable
jtable
JTable in a JInternalFrame
JTable
iscelleditable is not working in jtable