Icon =NewImageicon (getclass (). getresource ("middle.gif "));
Object [] Options = {"yes", "no", "not sure "};
IntN=
|
Joptionpane.Showoptiondialog(This,
"Do you like watching dingying? ",
"Custom inquiry ",
Joptionpane.Yes_no_cancel_option,
Joptionpane.Question_message, Icon, options, options [2]); |
|
IntN= Joptionpane.Showconfirmdialog(This, "Do you like blue? "," Ask ", joptionpane.Yes_no_option);
|
IntN= Joptionpane.Showconfirmdialog(This, "Do you like blue? "," Ask ", joptionpane.Yes_no_option); |
|
Object [] Options = {"yes, please", "No way! "};
IntN= Joptionpane.Showoptiondialog(This,
"Wocould you like green eggs and ham? "," A silly question ",
Joptionpane.Yes_no_option, Joptionpane.Question_message, Null,
Options, // The titles of buttons
Options [0]); // default button title
|
Object [] possibilities = {"apple", "banana", "orange "};
StringS= (String) joptionpane.Showinputdialog(This,
"What kind of fruit do you like? : \ N ",
"Customized dialog", joptionpane.Question_message, Null, Possibilities, "apple "); |
|
StringInputvalue= Joptionpane.Showinputdialog("Enter a value :"); |