This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Several JPanels in a scrollable object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Several JPanels in a scrollable object" Watch "Several JPanels in a scrollable object" New topic
Author

Several JPanels in a scrollable object

Barry Brashear
Ranch Hand

Joined: Jun 05, 2001
Posts: 303
Is it possible to place several JPanels in an object that is scrollable?
Will a JScrollPane handle this?
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
>Is it possible to place several JPanels in an object that is scrollable?
yes

>Will a JScrollPane handle this?
yes
Barry Brashear
Ranch Hand

Joined: Jun 05, 2001
Posts: 303
How do you do this?
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
>How do you do this?

say you have 5 panels
create a 'holding' panel, set up as gridlayout(5,1)
add all the panels to the holding panel
add the holding panel to the scrollpane
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Several JPanels in a scrollable object