Nifty Gui, cannot see button control in Jmonkey sdk

Hi Guys, For some reason i cannot see the buttons added to nifty gui xml file. I’m using the SDK to view the buttons.



Here is the code

Code:
<?xml version="1.0" encoding="UTF-8"?> <nifty xmlns="http://nifty-gui.sourceforge.net/nifty-1.3.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://nifty-gui.sourceforge.net/nifty-1.3.xsd http://nifty-gui.sourceforge.net/nifty-1.3.xsd"> <useStyles filename="nifty-default-styles.xml" /> <useControls filename="nifty-default-controls.xml" /> <screen id="start" controller="mygame.Main"> <layer id="layer" backgroundColor="#003f" childLayout="center"> <layer id="background" backgroundColor="#000f">
        &lt;/layer&gt;
        &lt;layer id=&quot;foreground&quot; backgroundColor=&quot;#0000&quot; childLayout=&quot;vertical&quot;&gt;
            &lt;panel id=&quot;panel_top&quot; height=&quot;25%&quot; width=&quot;75%&quot; align=&quot;center&quot; childLayout=&quot;center&quot;  backgroundColor=&quot;#f008&quot;&gt;  
            &lt;/panel&gt;
            &lt;panel id=&quot;panel_mid&quot; height=&quot;50%&quot; width=&quot;75%&quot; align=&quot;center&quot; childLayout=&quot;center&quot;
            backgroundColor=&quot;#0f08&quot;&gt;  
                &lt;control name=&quot;button&quot; label=&quot;Start&quot; id=&quot;StartButton&quot; align=&quot;center&quot; valign=&quot;center&quot;&gt; 
                &lt;/control&gt;
            &lt;/panel&gt;
        &lt;/layer&gt;
    &lt;/layer&gt;
&lt;/screen&gt;

</nifty>

The nifty viewer in the SDK is fairly limited at the moment (or at least it was last time I used it). It doesn’t cope with importing styles/etc so as soon as you try and do that it stops working.



Try testing it by running up the application and see if it looks better.

You’ve nested layers. You can’t do that. Layers aren’t nestable.

Yes importing styles and other classes works in the preview too. It has to be on the project classpath though.