Solved

How to stop auto resize in BorderLayout

Posted on 2001-06-04
4
526 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

706 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now