how to create a joptionpane yes or no in java code example
Example: 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
}