Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JPanel scroll bar

 
Nicky Eng
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I cant find how to set scroll bar in a JPanel...

or i should just use JPanel and make it the ScrollPane's client like this: ?

JPanel p= new JPanel();
JScrollPane scrollPane = new JScrollPane(p);

Can it works?
I mean i have a lot of components inside p JPanel.
anyone give idea please.
ps: i want a small panel which has scroll bar vertically INSIDE a big panel.
 
prashant gour
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that will work.you can add panel to scroll pane. No problem
 
Nicky Eng
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you.
my problem solved last nite tho.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic