4
我有一個運行在EDT上的方法,在這個方法中,我想讓它在新的(非EDT)線程上執行某些操作。我現在的代碼如下:讓線程在EDT的非EDT(事件調度線程)線程上運行
@Override
public void actionPerformed(ActionEvent arg0) {
//gathering parameters from GUI
//below code I want to run in new Thread and then kill this thread/(close the JFrame)
new GameInitializer(userName, player, Constants.BLIND_STRUCTURE_FILES.get(blindStructure), handState);
}
我希望它的EDT之外執行,在一個新的線程 – Aly 2010-03-12 21:50:49
看我的例子,該工作將不會在美國東部時間執行。 – 2010-03-12 21:53:52
謝謝我打電話給t.run()取而代之的是 – Aly 2010-03-12 21:57:46