Once an application creates an AWT component such as a Frame, then
even if all AWT components go away, the AWT threads still exist and
run. This means that even if a program exits its main method, the
program will continue to run until some bit of code calls System.exit.
Below is a test case. The following application doesn't exit unless
you uncomment the System.exit call.
import java.awt.*;
public class Test
{
public static void main(String argv[])
{
Frame f = new Frame();
f.show();
f.hide();
f = null;
//System.exit(0);
}
}