In Java, how could I set a JFrame to automatically go beside another JFrame?
So, say I have two JFrame
objects, frameA
and frameB
, and when the program runs, it sets frameA
s location to be in the middle of the screen by using:
setLocationRelativeTo(null);
Now what I want is to make frameB
to be on the right side of frameA
, so they would be right beside each other. (frameA
s right side would be touching frameB
s left side)
How would you do this?