Solved

How to stop auto resize in BorderLayout

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Understanding websocket example in spring 1 57
Starting to learn JAVA, 7 59
Java asynchronous logging 4 50
servlet  URL Rewriting 1 26
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
The viewer will learn how to implement Singleton Design Pattern in Java.

911 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

22 Experts available now in Live!

Get 1:1 Help Now