From acbfa9bda490db27df586af2d38753f7947fdf0f Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Mon, 3 Jun 2024 18:08:15 +0200 Subject: [PATCH] Run in Event Dispatch Thread --- app/src/main/java/gui/XL.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/gui/XL.java b/app/src/main/java/gui/XL.java index 6dc9079..80f0b07 100644 --- a/app/src/main/java/gui/XL.java +++ b/app/src/main/java/gui/XL.java @@ -6,6 +6,7 @@ import static java.awt.BorderLayout.SOUTH; import javax.swing.JFrame; import javax.swing.JPanel; +import javax.swing.SwingUtilities; import gui.menu.XLMenuBar; public class XL extends JFrame { @@ -44,6 +45,7 @@ public class XL extends JFrame { } public static void main(String[] args) { - new XL(new XLList(), new XLCounter()); + // Run on the Event Dispatch Thread + SwingUtilities.invokeLater(() -> new XL(new XLList(), new XLCounter())); } }