use invokeAndWait for update, need to test on windows

master
melvin 2011-07-26 11:03:18 +08:00
parent 077d06f564
commit 6eaaac3eb3
1 changed files with 2 additions and 6 deletions

View File

@ -288,7 +288,8 @@ public class GameController {
}
public void update() {
SwingUtilities.invokeLater(new Runnable() {
//SwingUtilities.invokeLater(new Runnable() {
invokeAndWait(new Runnable() {
public void run() {
gamePanel.updateInfo();
gamePanel.update();
@ -470,11 +471,6 @@ public class GameController {
}
} else {
update();
try {
Thread.sleep(10);
} catch (final Exception ex) {
System.err.println("ERROR! Exception while controller thread sleeping.");
}
}
}
running.set(false);