Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

setLocationRelativeTo(null) not working

800349Dec 23 2008 — edited Jan 3 2009
I'm trying to use setLocationRelativeTo(null) to center a JFrame however it's not working?

I'm using it elsewhere to do the same and it works, but this doesn't and the only difference is that it's being run in a separate thread. Why isn't it working properly?
I say properly, because it's not displaying it in the top left, but is to the bottom right of the center.

Please help
Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 31 2009
Added on Dec 23 2008
11 comments
2,696 views