以下代码执行良好:
public static void main(String [] args) {
Runnable r = new Runnable() {
public void run() {
createGUI();
}
} ;
javax.swing.SwingUtilities.invokeLater(r);
}
我很好奇为什么以下代码无法编译:
import javax.swing.SwingUtilities;
public static void main(String [] args) {
Runnable r = new Runnable() {
public void run() {
createGUI();
}
} ;
invokeLater(r);
}
javax.swing.SwingUtilities.invokeLater(r);
和有什么区别import javax.swing.SwingUtilities; invokeLater(r);