reducing TriggerImage startup glitches

This commit is contained in:
Andrey 2022-03-19 21:28:43 -04:00
parent cd1009cd6a
commit 8e9ec8a26d
1 changed files with 14 additions and 12 deletions

View File

@ -126,21 +126,23 @@ public class TriggerImage {
};
JPanel topPanel = new JPanel(new FlowLayout());
SwingUtilities.invokeAndWait(() -> {
content.add(topPanel, BorderLayout.NORTH);
content.add(triggerPanel, BorderLayout.CENTER);
f.showFrame(content);
f.getFrame().setSize(900, 700);
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
UiUtils.trueRepaint(content);
});
SwingUtilities.invokeAndWait(() -> {
try {
generateImages(workingFolder, triggerPanel, topPanel, content);
} catch (IOException e) {
throw new IllegalStateException(e);
}
}
});
Thread.sleep(1000 * sleepAtEnd);
System.exit(-1);