Displays an error dialog box that displays a message of ' alert ': Joptionpane.showmessagedialog (NULL, alert, alert, joptionpane.error_message) ;
Displays an internal Information dialog box with the message ' Information ': Joptionpane.showinternalmessagedialog (frame, "information", "Information", Joptionpane.information_message);
Displays an information panel with the options "yes/no" and the message "Choose one": Joptionpane.showconfirmdialog (NULL, "Choose one", "Choose one", jopt Ionpane.yes_no_option);
Displays an internal Information dialog box with the options "Yes/no/cancel", the message is ' please choose one ' and has the title information: Joptionpane.showinternalconfirmdialog (frame, "Please choose one", "Information", Joptionpane.yes_no_cancel _option, Joptionpane.information_message);
Displays a warning dialog box with the options OK, cancel,title as ' Warning ', message for ' Click OK to continue ': object[] options = {"OK", "Cancel"}; Joptionpane.showoptiondialog (NULL, "Click OK to continue", "Warning", Joptionpane.default_option, Joptionpane. Warning_message, NULL, Options, options[0]);
Displays a dialog box that requires the user to type a string: string inputvalue = Joptionpane.showinputdialog ("Please input a value");
Displays a dialog box that requires the user to select String: object[] possiblevalues = {"A", "Second", "third"}; Object SelectedValue = Joptionpane.showinputdialog (null, "Choose One", "Input", Joptionpane.information_message, NULL, PossibleValues, possiblevalues[0]);