Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Several JPanels in a scrollable object

 
Barry Brashear
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to place several JPanels in an object that is scrollable?
Will a JScrollPane handle this?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>Is it possible to place several JPanels in an object that is scrollable?
yes

>Will a JScrollPane handle this?
yes
 
Barry Brashear
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you do this?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic