File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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.
 
Don't get me started about those stupid light bulbs.
 
subject: How to prevent auto resize in BorderLayout
 
Similar Threads
JInternalFrame iconifying size
JInternalFrame iconifying position issue
Link internal frame to menu item
event sequence
Frame/Frameset Framework