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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable in JScrollPane in JSplitPane" Watch "JTable in JScrollPane in JSplitPane" New topic
Author

JTable in JScrollPane in JSplitPane

Meyer Florian
Ranch Hand

Joined: Oct 20, 2003
Posts: 62
G'day!
I have a JSplitPane.
That JSplitPane has a horizontal Divider.
In the top Panel, I have a JScrollPane with some content (JLabels, JTextFields etc.).
The Scrollbars are shown.
In the bottom Panel, I have a JScrollPane with a JTable in it.
The Scrollbars are NOT shown.
What am I doing wrong? ='(
Thanx for any help!
Praiser
Don Kiddick
Ranch Hand

Joined: Dec 12, 2002
Posts: 580
The scroll bars will only show if the JTable is bigger than the JScrollPane it is "in".
D.
Don Kiddick
Ranch Hand

Joined: Dec 12, 2002
Posts: 580
This is unless you use the setHorizontalScrollBarPolicy and setVerticalScrollBarPolicy methods on JScrollPane.
D.
Eddie Vanda
Ranch Hand

Joined: Mar 18, 2003
Posts: 281
Hi,
I asked a similar question recently and the answer was to apply

(credit to Jason Steele).
It worked for me!


The nice thing about Standards is that there are so many to choose from!
Meyer Florian
Ranch Hand

Joined: Oct 20, 2003
Posts: 62
D, the table is bigger and the scrollbar policies are set to show always.
EV, doesn't work for my table, but I'll read ur other topic.
Thanks!
Praiser
Don Kiddick
Ranch Hand

Joined: Dec 12, 2002
Posts: 580
Sounds like you have a bug. Post your code.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTable in JScrollPane in JSplitPane
 
Similar Threads
GridBagLayout not scales JTable to the desired Weightx value.
JTable
JTable ........
JTable
Extending JTable