Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what does this statement mean

Tags:

java

swing

unlike SwingUtilities.invokeAndWait(), the event thread is permitted to call SwingUtilities.invokeLater(). I cannot understand this clearly.

Please help me in this.

like image 622
saplingPro Avatar asked Nov 28 '25 09:11

saplingPro


1 Answers

Another thread (not the main Swing event thread) can call invokeAndWait to wait for the Swing event thread to be ready to run some action. However, the Swing event thread cannot wait for itself. So it calls invokeLater to put the action in a queue for later execution.

like image 171
Joshua Fox Avatar answered Nov 29 '25 21:11

Joshua Fox



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!