When the user enters nothing in an input dialog box it ends the loop below. I've debugged the code and name is indeed "" when the user enters nothing.
while(name == "" || name == null){
name = JOptionPane.showInputDialog("Enter your name:");
}
Also, When the window containing the input dialog is closed or cancelled, the program doesn't exit the loop.
Can anyone provide some insight for me?