aspose file tools
The moose likes Swing / AWT / SWT and the fly likes JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply 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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: JTable
 
Similar Threads
iscelleditable is not working in jtable
JTable
jtable
JTable
JTable in a JInternalFrame