auto-sync
This commit is contained in:
parent
f6ddcff4ab
commit
79f4be4c63
|
@ -10,6 +10,7 @@ import java.awt.*;
|
|||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.net.URL;
|
||||
|
||||
import static com.rusefi.ui.util.LocalizedMessages.PAUSE;
|
||||
|
@ -114,4 +115,12 @@ public class UiUtils {
|
|||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void invokeAndWait(Runnable runnable) throws InterruptedException, InvocationTargetException {
|
||||
if (SwingUtilities.isEventDispatchThread()) {
|
||||
runnable.run();
|
||||
} else {
|
||||
SwingUtilities.invokeAndWait(runnable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue