shansi wrote:
> NotifyDescriptor nd = new NotifyDescriptor(msg, title,
> NotifyDescriptor.YES_NO_OPTION,
> NotifyDescriptor.QUESTION_MESSAGE,null,NotifyDescriptor.NO_OPTION);
> DialogDisplayer.getDefault().notify(nd);
>
> This doesn't work. Always the Yes option is selected.
http://wiki.netbeans.org/DevFaqFileBug> Is it possible to set the mnemonics for the Yes and No buttons?
You would need to make your own JButton's in such a case. Anyway you
would not want a mnemonic for the No button if it were the default
button for the dialog (the default button of a dialog should
conventionally have no mnemonic since just Enter works). In the normal
yes/no dialog, No (i.e. the non-default button) doesn't have a mnemonic
either because Escape (or closing the dialog window) has the same function.