Run in Event Dispatch Thread

This commit is contained in:
Imbus 2024-06-03 18:08:15 +02:00
parent 61e42fcfc4
commit acbfa9bda4

View file

@ -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()));
}
}