Reputation: 12484
I'm running a large Java Eclipse project and when it starts up, I see 3 pop-up windows tiled on top of each other, as so:
I need to have them start up separated positions, as I'm always testing the program and dragging the windows. Can I somehow put them all in a bigger GUI window(pane)?
Upvotes: 0
Views: 340
Reputation: 23035
Use setLocation() method
windowName.setLocation(location_parameters);
passing the 'null' as an argument will make the window center.
There is another way,
setLocationRelatedTo(item_to_relate)
method. this will locate them according to the existing things like JLabels, existing windows, etc.
Upvotes: 2
Reputation: 51565
Can I somehow put them all in a bigger GUI window(pane)?
You presently have 3 JFrame
s, I think.
You could change this to 3 JPanel
s in one frame.
You would use a layout manager to arrange the 3 JPanel
s the way you want.
Upvotes: 1