What code do I need to close (dispose) of a project. I want to put the code behind a button on a menu (I know how to dispose of a frame when pushing the x button on the title bar). The project name and the name of the jave file that encloses the main method both have the same name is this a problem? I have tried using .close() and .dispose(). thanks a lot!