I am trying to center and/or position a dialog box that by default is popping up right over the button that calls it.
Any help would be much appreciated. Thank you.
You need to set the location of the window with method call to setLocation(int x, int y). Otherwise the dialogs (0,0) cordinate will line up with the window it is dependent upon.
Hmmm. What behaviour do you get now, with the dialog on-screen, when you maximise another application over yours and then flip back to yours? Does the dialog reappear with your app?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.