SwingUtilities.invokeLater () vs EventQueue.invokeLater ()

Are there any differences between EventQueue.invokeLater() and SwingUtilities.invokeLater() ?

Or is it just built on top of the first (no change) for the sake of design?

+47
java swing
Jan 13 '12 at 7:10
source share
1 answer

There is no difference.

The SwingUtilities class was built to combine all the common utility methods used in swing into one class. Internally, SwingUtilities.invokeLater() calls EventQueue.invokeLater()

 1197 public static void invokeLater(Runnable doRun) { 1198 EventQueue.invokeLater(doRun); 1199 } 

Link: http://kickjava.com/src/javax/swing/SwingUtilities.java.htm

+73
Jan 13 '12 at 7:16
source share



All Articles