Note: Please pay attention to the fact that this is an Options Dialog here, not a Confirm Dialog. That makes a difference in what I'm asking and how Swing behaves!
I looked at a good code example of an Option Dialog in action, but was confused by one thing:
If you are supplying the dialog with all the options in the
options
parameter, of what use/role/significance is theoptionType
parameter?
According to the Javadocs you're options are:
DEFAULT_OPTION
YES_NO_OPTION
YES_NO_CANCEL_OPTION
; orOK_CANCEL_OPTION
How do these different options affect the resultant dialog, or does Swing just ignore them?!? Thanks in advance!
The optionType parameter defines amongst which options the user will have to choose. If you use YES_NO_CANCEL_OPTION
, it will display 3 buttons, one for each option:
The same goes for all possible optionType values.