Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Check this link: <a href="http://www.jguru.com/faq/view.jsp?EID=131370" rel="nofollow">http://www.jguru.com/faq/view.jsp?EID=131370</a></p> <blockquote> <p>So to simplify the implementation of Swing library they chose it to be not thread safe. The argument being that most of the GUI related work happens in the callbacks from the GUI which happen on the single GUI thread anyways. Granted - for long running tasks the user will have to do more work if he/she wants to do multithreaded activity...</p> </blockquote> <p>Specially the link given for the jfc.</p> <p>And the this link: <a href="http://www.it.uu.se/edu/course/homepage/devgui/vt03/out/ThreadsAndSwing.pdf" rel="nofollow">http://www.it.uu.se/edu/course/homepage/devgui/vt03/out/ThreadsAndSwing.pdf</a></p> <blockquote> <p>After Swing components have been displayed on the screen, they should only be operated on by the event-handling thread. The event-handling thread (or just event thread) is started automatically by the Java VM when an application has a graphical interface. The event thread calls methods like paint() on Component, actionPerformed() on ActionListener, and all of the other event-handling methods</p> </blockquote> <p><hr> <strong>ADD</strong></p> <p>Check the second link I have given, specially the section: <strong>The Need for Worker Threads in a GUI Setting</strong> (also there is an example for explaining it). Quoting here for reference:</p> <blockquote> <p>The event thread plays a critical role in an application with a graphical interface. Code that will be executed by the event-handling thread should be relatively brief and nonblocking. If the event-handling thread is blocked in a section of code for a while, no other events can be processed!</p> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload