A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
Swing / AWT / SWT
Author
JTable problem
seema prakash
Ranch Hand
Joined: Nov 17, 2004
Posts: 59
posted
Jan 04, 2005 09:53:00
0
I have 2 tables. I want to display all the tables on the same screen one below the other. I tried adding the each table to a panel. The panels were added to the
JScrollPane
, but the tables were not displayed as desired.
Please help.
JPanel p = new JPanel(); JPanel tablePanel = new JPanel(); p.add(__table[0]); tablePanel.add(__table[1]); __scrollPane.add(p); __scrollPane.add(tablePanel); getContentPane().add(__scrollPane); setSize(new Dimension (200,300)); __scrollPane.setVisible(true);
Tim McGuire
Ranch Hand
Joined: Apr 30, 2003
Posts: 819
I like...
posted
Jan 04, 2005 12:30:00
0
You should have one
JScrollPane
for each table.
I agree. Here's the link:
jrebel
subject: JTable problem
Similar Threads
How To Keep Space at The Bottom Of My Scrollable JTable
Adding a row in a table
Dont understand this initialization issue
JTable in Headless Mode
Table will not refresh?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter