I cannot find any official documentation saying that it is safe to call Component.repaint
from another thread than the Event Dispatch Thread, the EDT.
Is this so? And where can I find some documentation/code?
Here is a quote from an official page stating that:
The following JComponent methods are safe to call from any thread:
repaint()
,revalidate()
, andinvalidate()
. Therepaint()
andrevalidate()
methods queue requests for the event-dispatching thread to callpaint()
andvalidate()
, respectively.
EDIT 1 :
Since the previous link mentioned has been shifted. I am posting a new link, though it might take a bit more time to actually know the authenticity of this page, since it appears to be from Java
though it originated from some University
's server, as can be seen from the address bar.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With