posted 21 years ago
System.exit(0) will indeed close the frame, however, this will also close ALL your frames if you have any others running within the same application.
If you just need to close a frame without actually exiting the application, use myFrame.dispose() method.