This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.