myJFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
Dispose is almost always preferred. If you explicitly say EXIT_ON_CLOSE and you ever want to display more than a single window, you will need to modify your code to use DISPOSE_ON_CLOSE instead. Not a huge deal, of course, just seems a better choice.
In my opinion, the DISPOSE_ON_CLOSE should have been the default, not HIDE_ON_CLOSE. Oh well, that's what we've got. EXIT_ON_CLOSE should probably be avoided for the same reason that calling System.exit(0) should be avoided in a window listener (though there's nothing wrong with it per se, it's just not very future flexible).
Even better, it's almost always preferred to attach a WindowListener to your frame and set the default close to JFrame.DO_NOTHING_ON_CLOSE. This way, you control when your application shuts down, including a prompt to the user to save any work, etc.