mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 05:40:45 +00:00
invokelater only the startwork
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user