invokelater only the startwork

This commit is contained in:
Honfika
2013-11-14 00:06:45 +01:00
parent f5effd21f2
commit e918209716
2 changed files with 13 additions and 1 deletions
@@ -215,6 +215,18 @@ public class View {
}
public static void execInEventDispatch(Runnable r) {
if (SwingUtilities.isEventDispatchThread()) {
r.run();
} else {
try {
SwingUtilities.invokeAndWait(r);
} catch (InterruptedException | InvocationTargetException ex) {
Logger.getLogger(View.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
public static void execInEventDispatchLater(Runnable r) {
if (SwingUtilities.isEventDispatchThread()) {
r.run();
} else {