This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes How EventDispatchThread starts a new thread ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How EventDispatchThread starts a new thread ?" Watch "How EventDispatchThread starts a new thread ?" New topic
Author

How EventDispatchThread starts a new thread ?

Mohit J Kumar
Greenhorn

Joined: Apr 08, 2010
Posts: 28


Usually we call start() to start the execution of a thread but in Swing (code above) there is no such call.
How EDT starts the thread execution ???

Thanks


"It's good to B in touch...So keep responding"
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

How EDT starts the thread execution ???

You have this wrong. Read the documentation. SwingUtilities#invokeLater (or invokeAndWait) doesn't start* a new thread. What it does is this:
Causes doRun.run() to be executed asynchronously on the AWT event dispatching thread.


* If and only if the EDT isn't already started, then the call to this method will result in launching the EDT. That's not anything a client program has to concern itself with.


luck, db
There are no new questions, but there may be new answers.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How EventDispatchThread starts a new thread ?
 
Similar Threads
Exercise 13.6 in - A Programmer's Guide to Java SCJP Certification - 3rd Ed
question from Dan's on thread
thread question
join()
threads