BIRT 3.7
Written by: Michael Williams
Featured Refcardz: Top Refcardz:
  1. Scrum
  2. Apache Maven 2
  3. Essential MySQL
  4. Node.js
  5. Groovy
  1. jQuery Selectors
  2. Ajax
  3. Java
  4. Spring Config.
  5. Java Concurrency

Link Details

Link 56222 thumbnail
User 168451 avatar

By aalmiray
via pushing-pixels.org
Published: Dec 08 2007 / 16:01

The threading rules in Swing are one of the main reasons for the perceived slowness of Java desktop applications (it remains to be seen whether JavaFX will address this issue for anything other than toy demo applications that have started appearing lately). This article by John Zukowski is an excellent overview of the threading rules in Swing since its inception, and how to write applications that do not break the thread safety. All different EDT-related rules pretty much boil down to one simple thing - anything that affects pixels on the screen should be done on EDT. However, these rules are all concerned about the where and not the when. And the when is very important.
  • 12
  • 1
  • 1551
  • 1

Comments

Add your comment
User 230306 avatar

Eric Burke replied ago:

0 votes Vote down Vote up Reply

While the points about EDT are fine, recommending SwingUtilities.invokeLater on every button click seems like bad advice.

User 160542 avatar

Kirill Grouchnikov replied ago:

0 votes Vote down Vote up Reply

Bad as in "producing incorrect runtime behavior"?

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (12)



Voters Against This Link (1)