JOption Pane
I am using JOption pane to get the Yes, no , cancel confirmation box ...how can I make the Yes button disabled in the dialog box if a particular situtation occurs.
int selection = JOptionPane.showConfirmDialog(null,
"Changes have been made \n , Save Changes?", "Save Changes",
JOptionPane.YES_NO_CANCEL_OPTION);
if (selection == JOptionPane.YES_OPTION)
{
//do something
}
else if (selection == JOptionPane.NO_OPTION)
{
// do something
}

