I am using netbeans to handle my GUI however when I click on the X button to exit, the window is gone but the application remains running in the background. However, going through file-> exit will close the whole thing. How can I capture the window close event or make sure the window is closed?
I searched in the form and I found the mainFrame.setDefaultCloseOperation(mainFrame.DISPOSE_ON_CLOSE); //or even exit on close
I added a windows listener to the frame that but no luck. Wehn I debugged it , it seems that the code of "closing window" is not being hit. I see the code for every thing inside the frame but I can't find the generated code that deals with creating the frame and its specs. hmmm