@Override
            public void actionPerformed(ActionEvent e) {
                if (verifyAndSaveCurrentSelection()) {
                    setUserSelection(APPROVE_SELECTION);
                    dispose();

                    // System.gc() should be called to prevent "X Error of
                    // failed request: RenderBadPicture (invalid Picture
                    // parameter)"
                    // on Linux when using AWT/Swing + GLFW.
                    // For more info see:
                    // https://github.com/LWJGL/lwjgl3/issues/149,
                    // https://hub.jmonkeyengine.org/t/experimenting-lwjgl3/37275
                    System.gc();
                    System.gc();
                }
            }
<code>init</code> creates the components to use the dialog.
jme3-awt-dialogs/src/main/java/com/jme3/awt/AWTSettingsDialog.java