• Post Reply Bookmark Topic Watch Topic
  • New Topic

Adding Scroll bars to JPanel

 
ganshre
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to add Scroll bars to JPanel ? If i use JScrollPane , it's not at all working ? if anybody knows the how to do please reply me. thanx.
 
Sandhya Rprasad
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ganashree,
Try setting the layout for the panel to Grid Layout once you've put the panel inside the scrollpane. Try adding some buttons so that the alignment takes place such that the scrollbar appears once the buttons nos. exceeds the scrollpane view.
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

"ganshre"
javaranch has millions of visitors everyday. and due to some
unforeseen circumstances, we try to enforce a naming std.
ganshre is not considered a valid name on javaranch.com.
Pl. visit this like http://www.javaranch.com/name.jsp and
re-register with a valid name.
Thanks for your cooperation.
- satya
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!