I have a stand alone application. When i resize the window, it moves everyting all around within the bigger window. How can i get it to stay the same, or mostly similar? Im using java 1.3
j
It sounds like you are having Layout Manager problems.
You are most likely using a Frame or JFrame as the basis(i.e superclass) for your application. In this case you will be using the java.awt.BorderLayout by default (this defines areas CENTER, NORTH, SOUTH, EAST, WEST - checkout the J2SE javadocs). If you resize your window then the Layout Manager will apply its rules to recalculate the Componet placements.
Use can choose the Layout Manager you want by the setLayout() method on JFrame (or Frame).
If you use setLayout(null) then you will not use any layout manager and will have to use absolute positioning. In this case when you call setSize(), setBounds(), setLocation() on your componets they will stick there no matter what sizing you do to your main window (i.e Frame or JFrame).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.