Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to stop auto resize in BorderLayout

Posted on 2001-06-04
4
Medium Priority
?
538 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
[X]
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
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 200 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
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:
Suggested Courses

604 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