@David Kroukamp
withdrawal from the L&F substance (you have any uncertainties regarding EDT, which is for testing purposes)
run: JButton openDialog >>> Is there EDT ??? == true Worker started >>> Is there EDT ??? == false waiting 30seconds Worker endeded >>> Is there EDT ??? == false before JOptionPane >>> Is there EDT ??? == false org.pushingpixels.substance.api.UiThreadingViolationException: Component creation must be done on Event Dispatch Thread
and another 200 lines about the details
output "correct container created out of EDT"

I will check this on another L&F, there will be problems with Nimbus, SystemLokkAndFeel in most cases does not care about big errors in EDT (very different sensitivity to EDT), Metal by default does not have a release on Windows and Java6, then your example works on second bases.
EDIT
Nimbus doesn't care either

from code
import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.*; import javax.swing.plaf.FontUIResource; public class Test { public static void main(String[] args) throws Exception { try { for (UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { UIManager.setLookAndFeel(info.getClassName()); UIManager.getLookAndFeelDefaults().put("nimbusOrange", (new Color(127, 255, 191))); break; } } } catch (ClassNotFoundException ex) { } catch (InstantiationException ex) { } catch (IllegalAccessException ex) { } catch (javax.swing.UnsupportedLookAndFeelException ex) { } SwingUtilities.invokeLater(new Runnable() { @Override public void run() { new Test().createAndShowUI(); } }); } private void createAndShowUI() { JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); initComponents(frame); frame.setPreferredSize(new Dimension(300, 300));
source share