Is it possible to render a javax.swing.JButton and other swing elements in a lwjgl window (with openGL)? If not, what can you recomend for in game GUI in lwjgl?
Note: i tried Nifty-GUI and TWL, but i dont like the XML part, and the documentation was poor…
Adding a
javax.swing.JButtonto ajava.awt.Canvasused forDisplaymay be subject to rendering artifacts. Instead, try one of the following alternatives:Add the button to a
JPanel, as shown here. Put yourDisplayin aCanvas, as shown here. Put both in a suitable layout, e.g.Control your
Displayusing components in a modeless dialog, illustrated here.