Ok, here's the scenario (coming along pretty well):
I have an application AutoHistory that calls an AddVehicle application as follows:
This works well, and the AddVehicle does it's task of presenting a panel from which vehicle information is collected; then, when a "Save" button is pressed, it adds the information to a file. Now, at the bottom of the AddVehicle panel is a "Return" button; when this button is pressed I would like it to close the AddVehicle application and return to the AutoHistory application.
setVisible(false) merely hides the window, whereas dispose() really cleans up the Window. After calling setVisible(false), a call to setVisible(true) will simply show the window again. After dispose() the window has to be completely rebuilt from system resources.