Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to stop auto resize in BorderLayout

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
jar file executable 12 58
print map entry 34 72
how to add new optional parameter to JSP 1 49
add projects t working set in maven 2 19
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
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:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

839 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