The title says it all.
I've got a program that uses a few JFrames and JDialogs. The main window is a JFrame and always appears in the top left corner of the screen. The same applies to all other JFrames I use. In contrast, a JDialog that I use appears in the middle of the screen (both X and Y). I think this is rather "ugly". How can I change this.
The nicest would be if I could specify that every JFrame and JDialog that are not the main window should appear in the middle of the main window JFrame (both X and Y).
If that is not possible, I would like to specify that every JFrame appears in the middle of the screen.