Answers for "joptionpane yes no option java"

1

joptionpane.showconfirmdialog yes no example

int answer = JOptionPane.showConfirmDialog(parentComponent, 
		"Your message goes here", "Your title goes here", 
        JOptionPane.YES_NO_OPTION);

if (answer == JOptionPane.NO_OPTION) {
	// do something
} else if(answer == JOptionPane.YES_OPTION) {
  	// do something else
}
Posted by: Guest on May-01-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language