diff --git a/src/main/java/com/threerings/getdown/launcher/GetdownApp.java b/src/main/java/com/threerings/getdown/launcher/GetdownApp.java index e5f0386..050ba36 100644 --- a/src/main/java/com/threerings/getdown/launcher/GetdownApp.java +++ b/src/main/java/com/threerings/getdown/launcher/GetdownApp.java @@ -5,6 +5,7 @@ package com.threerings.getdown.launcher; +import java.awt.EventQueue; import java.awt.Color; import java.awt.Container; import java.awt.IllegalComponentStateException; @@ -22,7 +23,6 @@ import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collections; import java.util.List; import javax.swing.JFrame; @@ -231,20 +231,25 @@ public class GetdownApp @Override protected void fail (String message) { - // if the frame was set to be undecorated, make window decoration available - // to allow the user to close the window - if (_frame != null && _frame.isUndecorated()) { - _frame.dispose(); - Color background = _frame.getBackground(); - if (background != null && background.getAlpha() < 255) { - // decorated windows do not allow alpha backgrounds - _frame.setBackground( - new Color(background.getRed(), background.getGreen(), background.getBlue())); - } - _frame.setUndecorated(false); - showContainer(); - } super.fail(message); + EventQueue.invokeLater(new Runnable() { + @Override + public void run() { + // if the frame was set to be undecorated, make window decoration available + // to allow the user to close the window + if (_frame != null && _frame.isUndecorated()) { + _frame.dispose(); + Color background = _frame.getBackground(); + if (background != null && background.getAlpha() < 255) { + // decorated windows do not allow alpha backgrounds + _frame.setBackground( + new Color(background.getRed(), background.getGreen(), background.getBlue())); + } + _frame.setUndecorated(false); + showContainer(); + } + } + }); } protected JFrame _frame;