Is a new thread created when using Runnable with SwingUtilities.invokeAndWait()?
SwingUtilities.invokeAndWait()
No, a new thread is not created when Runnable is used with SwingUtilities.invokeAndWait(). The Thread event ultimately calls the run () Runnable method when it turns on the event queue.
invokeAndWait API .
Calls doRun.run (), which will execute synchronously in the AWT event dispatch thread.
. - Runnable GUI, , .
, . , EventQueue Runnable.
Causes doRun.run () to execute synchronously on the AWT dispatch thread event.
no, it fires an event in the AWT event stream (which is already running in gui applications)