I couldn't undrstand how JDialog's show method could invoke JOptionPane. eg. if(jdlg.show()==JOptionPane.CANCEL_OPTION) throw new Exception(); where this two classes are not directly related in heirarchy.
JOptionPane provides a set of static methods to create dialogs that are often needed for user interaction: for example to notify the user of some ongoing or to retrieve input like a password or to ask for a decision (save or save not on exit e.g.). JOptionPane probably uses JDialog internally though this is of no relevance if you are using JOptionPane. Even if it seems that the static methods in JOptionPane create only some very common dialogs it is possible to create very special dialogs using these methods. This is the case because the methods take Object instances as arguments instead of, say, Strings to display a message. Thus, you can put a whole panel into a dialog created by JOptionPane. (see the API for JOptionPane for an introduction on the different argument types.) I for my part have never used JDialog. JOptionPane always proved sufficient and _highly_ customizable enough. cheers