wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes How to prevent auto resize in BorderLayout Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to prevent auto resize in BorderLayout" Watch "How to prevent auto resize in BorderLayout" New topic
Author

How to prevent auto resize in BorderLayout

Jay Mistry
Greenhorn

Joined: May 19, 2001
Posts: 16
Hi,
I have a swing application which has a main screen that will hold many internal frames and a JLabel that acts like a status bar. Currently I am using BorderLayout and have added the status bar lable to the SOUTH border. Now however when ever I try to open any internal frames the internal frame is added to the CENTER border and is streached so that it takes up the whole screen; this is even after I have provided a size for these internal frames. How do I prevent the internal frames from streaching?
I am also suspecting that when I do get around this problem there will be another problem present. I think after I get the windows to show up the size I want, when I minimize them they will be hidden behind the statusbar lable - am I correnct to assume this, and if I am how can I also prevent this from happening?
I would really appreciate any input from anyone out there.
Thank you very much.
Jay
------------------
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Jay,
I think you might be better off using the JDesktopPane instead to perform the functionality you are proposing. The API for JDesktopPane:

A container used to create a multiple-document interface or a virtual desktop. You create JInternalFrame objects and add them to the JDesktopPane.

It has different layers which you can then use to position your status component so that it won't be covered by other panes or icons.
Regards,
Manfred.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to prevent auto resize in BorderLayout