To always display the dialogs, I always used code similar to the following:
JOptionPane.showMessageDialog(JOptionPane.getFrameForComponent(this), β¦ yada
However, now I think this is "more correct":
JOptionPane.showMessageDialog(getRootPane(), β¦ yada
What do people prefer / recommend?
source
share