swing - Java EventQueue. When should I consider using it? -


i'm looking @ eventqueue class on oracle website: http://download.oracle.com/javase/1.4.2/docs/api/java/awt/eventqueue.html i'm not sure when should use it? should use if class has listeners 2 or more events?

normally don't have submit events eventqueue, happens "automatically" when user actions (like mouse clicks , such), or when system thinks window needs repainted.

the 2 methods i'm using regularly eventqueue.invokelater , eventqueue.invokeandwait() (less often). use 1 of them if doing action outside of edt (event dispatch thread) , want changes gui (like adding or removing component to/from container), such actions should occur on edt.


Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -