How to set JFrame to appear centered, regardless of the Monitor resolution
- by AmateurProgrammer
While working in Java, I find it hard to position my Main application window in the very center of the screen when I start the application.
Is there any way I can do that? I tried with some of the predefined methods but none worked.
BTW it doesn't have to be vertically centered, horizontal alignment is the more important goal for me. But vertical alignment is also welcome.
Thanks