I didn’t find enough information how to create menu layouts with a comfortable GUI. I have been using LibGDX before which have a separate tool for menu creation (because LibGDX doesn’t contain own SDK – it is only set of libraries). Only using my watchfulness, I found a small button “Visual” between “XML” and “History” when I create a new clear UI and open it in the SDK.
If I right understood, I need to press this button to enable a visual editor (correct if I wrong understood the idea). But the SDK shows an error, which was already published somewhere in this forum:
java.lang.IllegalStateException: Cannot instantiate com.jme3.gde.gui.view.NiftyGuiVisualElement
at org.netbeans.core.spi.multiview.MultiViewFactory$MapMVD.createElement(MultiViewFactory.java:439)
at org.netbeans.core.multiview.MultiViewModel.getElementForDescription(MultiViewModel.java:197)
at org.netbeans.core.multiview.MultiViewModel.getActiveElement(MultiViewModel.java:107)
at org.netbeans.core.multiview.MultiViewModel.getActiveElement(MultiViewModel.java:103)
at org.netbeans.core.multiview.MultiViewPeer.showCurrentElement(MultiViewPeer.java:445)
at org.netbeans.core.multiview.MultiViewPeer.showCurrentElement(MultiViewPeer.java:437)
at org.netbeans.core.multiview.MultiViewPeer$SelectionListener.selectionChanged(MultiViewPeer.java:904)
at org.netbeans.core.multiview.MultiViewModel.fireSelectionChanged(MultiViewModel.java:234)
at org.netbeans.core.multiview.MultiViewModel.setActiveDescription(MultiViewModel.java:95)
at org.netbeans.core.multiview.MultiViewModel$BtnGroup.setSelected(MultiViewModel.java:297)
at java.desktop/javax.swing.JToggleButton$ToggleButtonModel.setSelected(JToggleButton.java:356)
at java.desktop/javax.swing.ButtonGroup.setSelected(ButtonGroup.java:168)
at org.netbeans.core.multiview.MultiViewModel$BtnGroup.setSelected(MultiViewModel.java:293)
at org.netbeans.core.multiview.TabsComponent$ButtonMouseListener.mousePressed(TabsComponent.java:885)
at java.desktop/java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:288)
at java.desktop/java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:287)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6618)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3398)
at java.desktop/java.awt.Component.processEvent(Component.java:6386)
at java.desktop/java.awt.Container.processEvent(Container.java:2266)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4996)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4828)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4572)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4828)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:98)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:747)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:744)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.lang.NoSuchMethodException: com.jme3.gde.gui.view.NiftyGuiVisualElement.<init>()
at java.base/java.lang.Class.getConstructor0(Class.java:3761)
at java.base/java.lang.Class.getConstructor(Class.java:2442)
at org.netbeans.core.spi.multiview.MultiViewFactory$MapMVD.createElement(MultiViewFactory.java:425)
... 46 more
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:74)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
at org.netbeans.core.spi.multiview.MultiViewFactory$MapMVD.createElement(MultiViewFactory.java:422)
... 46 more
Caused by: java.lang.NoSuchMethodError: 'void de.lessvoid.nifty.builder.PopupBuilder.childLayoutAbsolute()'
at jada.ngeditor.model.utils.NiftyDDManager.<init>(NiftyDDManager.java:32)
at jada.ngeditor.guiviews.J2DNiftyView.init(J2DNiftyView.java:154)
at com.jme3.gde.gui.view.NiftyGuiVisualElement.<init>(NiftyGuiVisualElement.java:125)
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
... 49 more
One more interesting thing is that I have also tried to create a new clear project inside the SDK and selected Lemur (not Nifty) for the UI. But when I try to add a new empty GUI – I receive the same XML-layout as before in my previous NiftyGUI project and same error, when I press “Visual”. Does it mean – Lemur is not available for editing also?
Are there other methods to create simple static menus without manual XML-editing? Maybe third-party tools?