This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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