answersLogoWhite

0

invokeLater should be used when your code is performing a GUI change in the Swing UI library, and you cannot guarantee that the change is being made in the Event Dispatching Thread (which can cause data problems, as Swing is not "thread-safe"). So, invokeLater should be used if (1) you are using Swing, and (2) you are using Thread, and (3) the thread from 2 needs to update a GUI element that is part of Swing.

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

FranFran
I've made my fair share of mistakes, and if I can help you avoid a few, I'd sure like to try.
Chat with Fran
BeauBeau
You're doing better than you think!
Chat with Beau
ViviVivi
Your ride-or-die bestie who's seen you through every high and low.
Chat with Vivi

Add your answer:

Earn +20 pts
Q: When should the method invokeLater be used?
Write your answer...
Submit
Still have questions?
magnify glass
imp