I am having a slight problem with my frame. I have an Exit button in the frame and when the user clicks it, I ask them if they are sure they want to exit, if they click no nothing happens, else the program exits. I tried the same thing when the user clicks the 'X' on the frame window. However, regardless of what the user selects the program ends. I have this in my Frame's constructor. I was hoping someone could point out what I am doing wrong. Thanks.
// Close window event
public void windowClosing(WindowEvent we)
int result =
"Are you sure you want to close the window?",
if (result == JOptionPane.YES_OPTION)