what is difference between event dispatch thread and any normal thread like main thread in creation swing compoments and handling events , what is features of event dispatch thread over main thread
by coding , what is difference between these two Piece of code :
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NewJFrame().setVisible(true);
}
});
}
public static void main(String args[]) {
new NewJFrame().setVisible(true);
}
what does EDT do that can not be done by main thread or any other normal thread ?