Difference between invokeAndWait and invokeLater in Java?

Compiled By Unknown - No Comments
These are two methods Swing API provides Java developers to update GUI components from threads other than Event dispatcher thread. InvokeAndWait() synchronously update GUI component, for example a progress bar, once progress is made, bar should also be updated to reflect that change. If progress is tracked in a different thread, it has to call invokeAndWait() to schedule an update of that component by Event dispatcher thread. On other hand, invokeLater() is asynchronous call to update components.

Tags:

No Comment to " Difference between invokeAndWait and invokeLater in Java? "