Solved

How to stop auto resize in BorderLayout

Posted on 2001-06-04
4
528 Views
Last Modified: 2012-08-13
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


Also I have been with experts-exchange for a little over a month and for every questions I asked someone had asked me to let them know if there were any questions. How do I refresh the questions that I post so that it gets back to the top of the new questions list? Or how do I contact them back? please if you are going to offer me some extra help could you leave your e-mail so that I can get back to you; I would really appreciate your help.
0
Comment
Question by:jmistry
4 Comments
 
LVL 4

Expert Comment

by:oumer
ID: 6153985
It may be a little more work, but use the GridBaglayout, that gives you all the freedom you need
0
 
LVL 92

Accepted Solution

by:
objects earned 50 total points
ID: 6154287
When you say internal frames, I'm assuming you are using the JInternalFrame class. Generally these frames should be added to a JDesktopPane, which handles all the issues you discuss.
You add the JDesktopPane object to the CENTER border and add your internal frames to the JDesktopPane. This way the desktop panes handles the internal frame layout, not the BorderLayout.

As far as using ee goes, if you just go to the following url you'll be able to see all the comments including a spot for you to add your own at the bottom:

http://itworld.experts-exchange.com/jsp/qShow.jsp?ta=java&qid=20129706

0
 
LVL 5

Expert Comment

by:vemul
ID: 7752072
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- points to objects

Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

vemul
Cleanup Volunteer
0
 

Expert Comment

by:Banath
ID: 7850571
Per recommendation - points to objects

Banath
EE Moderator
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question