Sunday, January 27, 2002 07:02 AM
You are a bit off... ;)
Whenever you register an event listener for GUI events (like an ActionListener for a Button in the GUI), that event handler code will be run by the event loop thread.
Generally, in a GUI application, the main thread does nothing more than create the GUI and say "go" (by setting the GUI visible). After that, the main thread is done running.
Under normal circumstances, all the real work is performed by the event thread (unless you start other threads yourself). This isn't a problem, and doesn't cost anything extra in performance (some thread has to do the work...)