The more usual way to close the app on clicking the "X" at the top right is to set the properties of the enclosing JFrame. I presume you are familiar with the three things you have to do when setting up a JFrame?
There are several alternatives for setBounds, eg setSize (I don't know about setPreferredSize).
The default close operation for a JFrame is "HIDE_ON_CLOSE," so you usually change it to EXIT_ON_CLOSE. That of course obviates any need for a closing listener, unless you have a button or menu item marked "Close," or "Exit."
And try adding all your Listeners to the buttons; if you add the Listeners to other components you end up with a somethingOrOtherPerformed(SomeEventOrOther e){} method with a long list of if and else if blocks in.
I have my own ideas, and fulminate regularly about ActionListeners on these boards, for example
here. Add a Listener to each of your buttons; if the Listener has lots to do, just put a method call in its actionPerformed() method which deals with its action.