Btnnewbutton.addmouselistener (New Mouseadapter () {
public void mouseclicked (MouseEvent e) {//Error dialog box
Joptionpane.showmessagedialog (NULL,
"This is an error dialog box,"
"Error_message",
Joptionpane.error_message);
}
});
Button.addmouselistener (New Mouseadapter () {
public void mouseclicked (MouseEvent e) {//Internal Information dialog box
Joptionpane.showmessagedialog (NULL,
"This is an internal Information dialog box,"
"Information",
Joptionpane.information_message);
}
});
Button_1.addmouselistener (New Mouseadapter () {
public void mouseclicked (MouseEvent e) {//Warning dialog box
Joptionpane.showmessagedialog (NULL,
"This is a warning dialog box,"
"Warning_message",
Joptionpane.warning_message);
}
});
Button_2.addmouselistener (New Mouseadapter () {
public void mouseclicked (MouseEvent e) {//Query dialog box
Joptionpane.showmessagedialog (NULL,
"This is a query dialog box,"
"Question_message",
Joptionpane.question_message);
}
});
Button_3.addmouselistener (New Mouseadapter () {
public void mouseclicked (MouseEvent e) {//Display an information panel
Joptionpane.showconfirmdialog (NULL,
"This is an informational version,"
"Yes_no_option",
Joptionpane.yes_no_option);
}
});