Should I use the invokeLater() and invokeAndWait() method of EventQueue or SwingUtilities?

John Zukowski

Short answer: EventQueue.

Longer answer... Utility methods were added to the SwingUtilities class because the first version of the Swing classes had to work with JDK 1.1, even though Swing was released as standard fare for JDK 1.2. All the two SwingUtilities methods do now is wrap calls to call the methods in EventQueue. You can bypass the calls to SwingUtilities and call the EventQueue methods directly.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact