how to add yes and no to joptionpane.yes_no_option 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
}