GeeCON Prague 2014*
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


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
 
GeeCON Prague 2014
 
subject: Several JPanels in a scrollable object