1. Multiple JButtons, one Eventlistener in Java stackoverflow.comI have a 2D-Array of JButtons
And in a loop, I do all the init stuff. Now I want to add an EventListener to each JButton, that fires ... |
2. Creating an JButton that implements EventListener forums.oracle.comThe way I personally handle it is I always have a CleanUp method in my code, typically in the same class as main is. If it is not threaded, or is a simple GUI (differentiated because swing GUI's are always multithreaded) then the method does contain system.exit(0), usually right after dispose() without much else. If it is multithreaded, then that is ... |