External Publication
Visit Post

Swing(jFrame) can not initialize

jMonkeyEngine Hub May 27, 2026
Source

From what I can see, you can run NetBeans (or SDK since it is based on NetBeans), which might indicate that you can run AWT on your Mac.

You could try this (In a new project - controlled environment):

JFrame window = new JFrame();
window.setTitle("AWT/Swing - JME3");
window.setPreferredSize(new Dimension(500, 500));
window.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);



JPanel myPanel = new JPanel();
myPanel.setLayout(null);
myPanel.setBackground(Color.BLACK);


window.getContentPane().add(myPanel);
window.pack();

window.setLocationRelativeTo(null);

SwingUtilities.invokeLater(() -> {
    window.setVisible(true);
});

OxillenGlow:

Will changing to lwjgl 2 help?

If you use lwjgl3 along with awt, I’m not entirely sure about its compatibility with the current stable versions of JME3; there is currently beta version 5 with an improvement to the awt and JME3 backend.

It would be very helpful to see the output (logs) and how your build.gradle file is configured.

If you’re looking for an alternative similar to AWT, you can use Nuklear with this small library (or ImGUI with some tricks); it only works with lwjgl3.

Discussion in the ATmosphere

Loading comments...