-1

Generally we write a code wherein we call the function swingutilities.invokelater and pass a runnable object to it. when it will invoke actually? what is the purpose of invoking it later. I would be thankful if anyone helps me with this.

siddiq rehman
  • 145
  • 1
  • 2
  • 18

1 Answers1

1

From javadoc:

Causes doRun.run() to be executed asynchronously on the AWT event dispatching thread. This will happen after all pending AWT events have been processed. This method should be used when an application thread needs to update the GUI.

Basically the code of the Runnable is executed only when no other event needs to be processed

Davide Lorenzo MARINO
  • 26,420
  • 4
  • 39
  • 56