Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Increasing the size of the Panel  RSS feed

 
shalini gnana
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my program,I added the jpanel to the jscrollpane...So,i set the panel size bigger than scrollpane,so that panel scrolls inside the scrollpane...But the problen is when the drawing goes beyond the panel size...so,i want to increase the size of the panel dynamically..
Do its possible?
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just use setPreferredSize(). This is the size scroll panes will use to determine whether or not to display any scroll bars.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!