I want to know what the issue is when I try to close my Java Swing application when I add a listener to the form frameview. Here's how to produce my problem: In Netbeans, create a new Swing application project, then in the main class, create a local method that adds an empty mouse listener to the main window via this.getMainFrame().addMouseListener(new MouseAdapter(){}). Go into the form class, and call that method using .getApplication().createListenerMethod() in the form's constructor, right after InitComponents().
Run the program and you'll see that after closing it, netbean's little progress bar says it's still running :(
I find that if I set the form's default close operation to "dispose", it solves the problem. Why does it do this if I call a method from the form to the main application class to add a listener to itself? The reason why I'm adding it like this is that I want to keep the main application logic in the main file class, I feel uneasy writing code a in form designer parsed class.