SwingUtilities.invokeLater takes a Runnable and runs it on the EDT?
问题 I am confused with the signature of SwingUtilities.invokeLater . It takes a Runnable object. Is it this Runnable object that is handed over to the Event Dispatch Thread? Why can't I directly call createAndShowGUI on the run method of EDT (if it is possible)? I have read articles on SO on how the EDT and invokeLater work, but I am confused with the Runnable object that is passed. SwingUtilities.invokeLater(new Runnable() { public void run() { createAndShowGUI(); } }); And what would happen if