What is the event dispatching thread?

Posted by Roman on Stack Overflow See other posts from Stack Overflow or by Roman
Published on 2010-03-20T20:19:46Z Indexed on 2010/03/20 20:21 UTC
Read the original article Hit count: 185

Filed under:
|
|

I know what "thread" means and if I understand the event dispatching thread (EDT) as "just a thread", it explains a lot but, apparently, it does not explain everything.

I do not understand what is special about this thread. For example I do not understand why we should start a GUI in a the EDT? Why the "main" thread is bed for GUI? Well, if we just do not want to occupy the main thread why we cannot start GUI just in "another thread" why it should be some "special" thread called EDT?

Then I do not understand why we cannot start the EDT like any other thread? Why we should use some special tool (called invokeLater). And why GUI, unlike any other thread, does not start immediately. We should wait until it is ready to accept our job. Is it because EDT can, potentially execute several task simultaneously?

If you decide to answer this question, could you pleas use a really simple terminology because otherwise, I am afraid, I will not be able to understand the answer.

© Stack Overflow or respective owner

Related posts about java

Related posts about gui