[SOLVED] On Exit JoptionPane problem
Hi all
I have a problem in OnExit JOptionPane.I want to set the option when user click on Cancel option then Farme not close. My current code is this..
Code:
int exit = JOptionPane.showConfirmDialog(null, "Are you sure?");
if (exit == JOptionPane.YES_OPTION)
{
try
{
Runtime.getRuntime().exec("cmd.exe /c start www.yahoo.com");
}
catch (Exception exception)
{
System.out.println("Exception caught : " + exception.getMessage());
}
System.exit(0);
}
if (exit == JOptionPane.NO_OPTION)
{
System.exit(0);
}
if (exit == JOptionPane.CANCEL_OPTION)
{
System.exit(0);
}
// System.exit(0);