{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreibe4bxt56gw6kclk3k6bxnksgxzjpedzm2jobatyvfbjyntwnj7w4",
"uri": "at://did:plc:dxjzgxe7cvirxkwfjr2tjspt/app.bsky.feed.post/3mmgknkzrx4p2"
},
"path": "/t/swing-jframe-can-not-initialize/49594#post_1",
"publishedAt": "2026-05-22T03:04:32.000Z",
"site": "https://hub.jmonkeyengine.org",
"textContent": "Even this simple code can not run pass the first point:\n\n\n package test;\n\n import javax.swing.JFrame;\n import javax.swing.SwingUtilities;\n\n public class Test {\n public static void main(String\n args) {\n\n SwingUtilities.invokeLater(() -> {\n System.out.println(\"1\");\n JFrame f = new JFrame(\"Test\");\n System.out.println(\"1\");\n f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n System.out.println(\"1\");\n f.setSize(300, 300);\n System.out.println(\"1\");\n f.setLocationRelativeTo(null);\n System.out.println(\"1\");\n f.setVisible(true);\n System.out.println(\"1\");\n System.out.println(\"VISIBLE\");\n });\n }\n\n }\n\n\nit only prints 1, i do not know why. NO ERROR CODES, just runs forever\n\nbtw I am using mac 12.7.6",
"title": "Swing(jFrame) can not initialize"
}