java - What role does optionType play in a JOptionPane OptionsDialog? -


note: please pay attention fact options dialog here, not confirm dialog. makes difference in i'm asking , how swing behaves!

i looked @ code example of option dialog in action, confused 1 thing:

if supplying dialog options in options parameter, of use/role/significance optiontype parameter?

according javadocs you're options are:

  • default_option
  • yes_no_option
  • yes_no_cancel_option; or
  • ok_cancel_option

how these different options affect resultant dialog, or swing ignore them?!? in advance!

the optiontype parameter defines amongst options user have choose. if use yes_no_cancel_option, display 3 buttons, 1 each option:

  • yes
  • no
  • cancel

enter image description here

the same goes possible optiontype values.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -