This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes panel in JScrollPane-urgent 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 "panel in JScrollPane-urgent" Watch "panel in JScrollPane-urgent" New topic
Author

panel in JScrollPane-urgent

Priya Kannan
Ranch Hand

Joined: Jan 19, 2001
Posts: 72
Hello All!
I have a JPanel with many other panels added to it in Grid Layout. I have added this main panel to a JScrollPane. The number of panels added to the grid can be determined only during run time. So I have set the height of the JScrollPane to this run time variable. Everything goes well except for the "down arrow" button in the Scroll Bar. It is not visible. I know not what to do. Please help!!!
Thanks.
Gregg Bolinger
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

Check to make sure you are only dynamically setting the size of your JPanel that holds your other JPanels. Not your JSCrollPane. Sounds like you are setting it too large for the screen. Your scroll pane should be a fixed size no matter what.

------------------
Happy Coding,
Gregg Bolinger
Priya Kannan
Ranch Hand

Joined: Jan 19, 2001
Posts: 72
Thanks a Million Gregg!!!
Your reply was an eye-opener.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: panel in JScrollPane-urgent
 
Similar Threads
Rolling Scrollbar to JScrollPane's top
Multiple Panels Background Image
Swing
Need to dynamically add checkBoxes in a GUI
Swing