Is there a cleaner way to close out of a GUI window in Java then just clicing the X in the upper right hand corner? When I do this I get a NullPointerException error.
Is there a way to put an "Exit" button in a GUI window so that the window (program) closes much cleaner?
I'm aware of the system.exit command, but that's not what I'm looking for.
Any suggestions?