When exactly is the AWT thread started?

Sandip Chitale

Anytime the java.awt.Toolkit instance is (directly or indirectly) created. The direct way to create it is by calling-


Indrect way is by creating any AWT object.

Here is a sample program to play with -

import java.awt.*;
public class X 
	static Frame f;
	public static void main(String[] args)
		f = new Frame();

See also: What exactly is the "Event Dispatch" thread (aka "AWT" Thread)?