Is it allowed to load Swing classes in non-EDT thread?

Posted by ddimitrov on Stack Overflow See other posts from Stack Overflow or by ddimitrov
Published on 2010-06-07T01:26:48Z Indexed on 2010/06/07 1:32 UTC
Read the original article Hit count: 319

Filed under:
|
|

After the introduction of Java Memory Model, the Swing guidelines were changed to state that any Swing components need to be instantiated on the EDT in order to avoid non-published instance state.

What I could not find anywhere is whether the classloading is also mandated to be on the EDT or can we pre-load key Swing classes in a background thread? Is there any official statement from Sun/Oracle on this? Are there any classes that are known to hold non-threadsafe static state, hence need to be loaded on EDT?

© Stack Overflow or respective owner

Related posts about java

Related posts about swing