reducing TriggerImage startup glitches
This commit is contained in:
parent
2cb8235c6a
commit
c0e26f99a6
|
@ -126,21 +126,23 @@ public class TriggerImage {
|
||||||
};
|
};
|
||||||
|
|
||||||
JPanel topPanel = new JPanel(new FlowLayout());
|
JPanel topPanel = new JPanel(new FlowLayout());
|
||||||
|
|
||||||
|
SwingUtilities.invokeAndWait(() -> {
|
||||||
content.add(topPanel, BorderLayout.NORTH);
|
content.add(topPanel, BorderLayout.NORTH);
|
||||||
content.add(triggerPanel, BorderLayout.CENTER);
|
content.add(triggerPanel, BorderLayout.CENTER);
|
||||||
|
|
||||||
f.showFrame(content);
|
f.showFrame(content);
|
||||||
f.getFrame().setSize(900, 700);
|
f.getFrame().setSize(900, 700);
|
||||||
|
|
||||||
SwingUtilities.invokeAndWait(new Runnable() {
|
UiUtils.trueRepaint(content);
|
||||||
@Override
|
});
|
||||||
public void run() {
|
|
||||||
|
SwingUtilities.invokeAndWait(() -> {
|
||||||
try {
|
try {
|
||||||
generateImages(workingFolder, triggerPanel, topPanel, content);
|
generateImages(workingFolder, triggerPanel, topPanel, content);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new IllegalStateException(e);
|
throw new IllegalStateException(e);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
Thread.sleep(1000 * sleepAtEnd);
|
Thread.sleep(1000 * sleepAtEnd);
|
||||||
System.exit(-1);
|
System.exit(-1);
|
||||||
|
|
Loading…
Reference in New Issue