Roberto Perillo wrote:Howdy, Charlie!
Champion, I believe you are looking for something like this:
Just as a note, the choice is not necessarily No - it can also be no choice, if the user clicked away the dialog with the little X. This will give the return value JOptionPane.CLOSED_OPTION which is different from JOptionPane.NO_OPTION. In most cases you don't care though, and will treat CLOSED_OPTION the same as NO_OPTION or CANCEL_OPTION - just as the Javadoc on CLOSED_OPTION mentions.