Reputation: 1
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
int a=JoptionPane.showConfirmDialog(null,"Do you really want to close the application","Select",JOptionPane.YES_NO_OPTION);
if(a==0)
{
System.exit(0);
}
Upvotes: 0
Views: 46
Reputation: 168845
int a=JoptionPane.show..
Should be:
int a=JOptionPane.show..
Java is case sensitive, and the first 'o' of an option pane is a capital 'O'.
Upvotes: 1