wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Increasing the size of the Panel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Increasing the size of the Panel" Watch "Increasing the size of the Panel" New topic
Author

Increasing the size of the Panel

shalini gnana
Ranch Hand

Joined: Sep 18, 2007
Posts: 189
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

Joined: Oct 27, 2005
Posts: 19655
    
  18

Just use setPreferredSize(). This is the size scroll panes will use to determine whether or not to display any scroll bars.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Increasing the size of the Panel
 
Similar Threads
How to create resizable swing components as in Netbeans Swings (GUI), drag and drop?
Scrolling BufferedImage
Problem in adding Scroll Bar to JPanel.
scrollpane problem
List chooser in Java