mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-16 12:21:52 +00:00
UI thread invoke fixes/improvements
This commit is contained in:
@@ -438,6 +438,12 @@ public class View {
|
||||
}
|
||||
}
|
||||
|
||||
public static void checkAccess() {
|
||||
if (!SwingUtilities.isEventDispatchThread()) {
|
||||
throw new RuntimeException("This method should be called from UI thread.");
|
||||
}
|
||||
}
|
||||
|
||||
public static void execInEventDispatch(Runnable r) {
|
||||
if (SwingUtilities.isEventDispatchThread()) {
|
||||
r.run();
|
||||
|
||||
Reference in New Issue
Block a user