I’ve always been using code similar to the following to display dialogs:
JOptionPane.showMessageDialog(JOptionPane.getFrameForComponent(this), … yada
However, I’m now thinking that this is "more correct":
JOptionPane.showMessageDialog(getRootPane(), … yada
What do people prefer / recommend?