aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes [B]How To Center/Position a showMessageDialog box?[/B] Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "[B]How To Center/Position a showMessageDialog box?[/B]" Watch "[B]How To Center/Position a showMessageDialog box?[/B]" New topic
Author

[B]How To Center/Position a showMessageDialog box?[/B]

Rick Wallace
Greenhorn

Joined: Nov 18, 2006
Posts: 6
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.
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
For JOptionPane, set the parentComponent argument to null.
Rick Wallace
Greenhorn

Joined: Nov 18, 2006
Posts: 6
Worked like a charm. Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [B]How To Center/Position a showMessageDialog box?[/B]