New theme created by calling SwingUtilities.invokeAndWait ()?

Is a new thread created when using Runnable with SwingUtilities.invokeAndWait()?

+5
source share
5 answers

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.

+7
source

invokeAndWait API .

Calls doRun.run (), which will execute synchronously in the AWT event dispatch thread.

+6
source

. - Runnable GUI, , .

+3

, . , EventQueue Runnable.

+2
source

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)

0
source

All Articles