JFrame y = new JFrame("myframe");
y.setBounds(300,400,300,300);
You could try this , the first two variables being for the X and Y position where the frame is put and the next two for the widtha nd heigth..Does this solve your problem??
zyaday
Junior Poster in Training
70 posts since Jun 2008
Reputation Points: 10
Solved Threads: 2
Is it possible to get the window size in Java
the getSize() method, amazingly, will do it
JamesCherrill
Posting Genius
6,371 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
You've got all you need here. From the position and size you know where the borders are. Try drawing a couple of touching rectangles on a sheet of paper and marking the positions and sizes on them - this should make all the relationships pretty obvious.
JamesCherrill
Posting Genius
6,371 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
Sorry, I thought both (all) the windows were part of your app. If some of them are not then you will need to get into the Windows/Mac/Linux system apis. Good luck!
JamesCherrill
Posting Genius
6,371 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073