Here is my code:

```
public static void nameset(){
    int no = 1;
    name = JOptionPane.showInputDialog(frame, "The last people who still had cake had to defend it with heir lives, No matter the cost.\nOne of those last people, was you. What is your name?", "",1);     
    if(name.equals("") || name.equals(JOptionPane.CANCEL_OPTION));{
        JOptionPane.showMessageDialog(frame,"Please tell me your name. I don't wanna have to exit out of the game about you.","Hey!",1);
        no++;
    }if (name.equals("") || name.equals(JOptionPane.CANCEL_OPTION)){
        if (no == 2){
            JOptionPane.showMessageDialog(frame, "Seriously? Again?! that's it..");
            if (name.equals(JOptionPane.CANCEL_OPTION)){
                System.exit(0);
            }else{
                System.exit(0);
            }
        }
    }
}

```

I want it so if you press the cancel option it tell you to restart. But if you press cancel, it shows an error in the console. I think it's the `name.equals(JOptionPane.CANCEL_OPTION)`, But I'm not sure. Is there any reason for it not to work? Thanks in advance for any help.