Getting hold of a reference to the object created by JOptionPane static methods
Posted
by
user548240
on Stack Overflow
See other posts from Stack Overflow
or by user548240
Published on 2010-12-28T00:45:26Z
Indexed on
2010/12/28
1:54 UTC
Read the original article
Hit count: 186
Hi,
I wonder if it is possible to get hold of a reference to the (JDialog?) object created by one of those static methods of JOptionPane (e.g. showMessageDialog)? I intend to modify the position where the dialog appears on the screen. More specifically, I want the dialog to appear at the top-left corner of the main app window, instead of the centre of the window by default. So having a reference to the object would enable me to use setLocation to achieve the desired effect...
Any suggestion would be appreciated! Thanks!
© Stack Overflow or respective owner