在我正在阅读的书中,每个带有多线程的 GUI 示例都有这样的内容:
public static void main(String[] args) throws Exception
{
    EventQueue.invokeLater(new Runnable()
    {
        public void run()
        {
            JFrame frame = new SomeKindOfFrame();
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setVisible(true);
        }
    });
}
(我的意思是事件队列)。但是代码不是在主(EDT)线程中自动执行的吗?