when the AWT Thread start

hi,

i want to know, when the AWT Thread start in the application.

According to tutorial it is started when any frame or applet start but i have checked before creating any window, it starts.

i have used SwingUtilities.invokeLater() method to code.

Is this method can also create the AWT thread.

[329 byte] By [jaimatadi@12a] at [2007-11-27 4:44:49]
# 1
Don't know what the "AWT Thread" is.In Swing the "Event Dispatching Thread" is started when the GUI is made visible I believe.
camickra at 2007-7-12 9:56:57 > top of Java-index,Desktop,Core GUI APIs...
# 2
> Don't know what the "AWT Thread" is.> > In Swing the "Event Dispatching Thread" is started> when the GUI is made visible I believe.Yeah, I remember reading that.
ktm5124a at 2007-7-12 9:56:57 > top of Java-index,Desktop,Core GUI APIs...
# 3
Can u give me a link that can explain Event Dispatch Thread deeply.
jaimatadi@12a at 2007-7-12 9:56:57 > top of Java-index,Desktop,Core GUI APIs...
# 4
http://java.sun.com/products/jfc/tsc/articles/threads/threads1.html
camickra at 2007-7-12 9:56:57 > top of Java-index,Desktop,Core GUI APIs...
# 5

I have gone through the link and try to implement as follows:

public static void main(String arg[]){

System.out.println(Thread.currentThread().getThreadGroup());// 1

SwingUtilities.invokeLater(new Runnable() {

public void run() {

System.out.println(Thread.currentThread()); // 2

}

});

}

when i run this code then -

At comment No. 1 -

Only main thread created and printed.

but when i used SwingUtilities.invokeLater method and print then it print AWT-EventQueue. So at this time how AWT-EventQueue created.

jaimatadi@12a at 2007-7-12 9:56:57 > top of Java-index,Desktop,Core GUI APIs...
# 6

I still have no idea what you are talking about or what your problem is.

If you run the following program the JVM will execute and terminate because the program has finished executing:

public class Test

{

public static void main(String args[])

{

javax.swing.JFrame frame = new javax.swing.JFrame();

//frame.setVisible( true );

}

}

If you uncomment the setVisible(..) line and rerun, then the JVM will not terminate because the setVisible(...) method will start the GUI Event Thread which will be active waiting for user events (MouseEvents, KeyEvents...). The JVM will only terminate when you close the frame in which case the EDT will also be terminated.

If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program[/url] (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.

Don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags[/url] so the posted code retains its original formatting.

camickra at 2007-7-12 9:56:57 > top of Java-index,Desktop,Core GUI APIs...