Nifty GUI and Panel layout


I’m new on the forum and new on jmonkey3/nifty GUI. (And also I’m French so please be cool with my English level…)

I’m “playing” with jme3 since 2 or 3 weeks now and I still have an issue with panel layout.

Here is the code of my Nifty Layout :


<layer id=“lightControlLayer” childLayout=“vertical”>

<panel heigth=""/>

<panel id=“lightControlPanel” height=“184px” width=“1000px” childLayout=“vertical” visibleToMouse=“true”>


<onHide name=“move” mode=“out” direction=“bottom” length=“600” startDelay=“0” inherit=“true” timeType=“exp” factor=“4”/>

<onShow name=“move” mode=“in” direction=“bottom” length=“600” startDelay=“0” inherit=“true” timeType=“exp” factor=“0.1”/>


<panel heigth=“10px” width=“1000px”/>

<panel heigth=“20px” width=“1000px” childLayout=“horizontal”>

<panel width=“51px”/>

<control id=“ambient_onoff” type=“plane-onoff” width=“42px” height=“34px” checked=“true” />

<panel width=“23px”/>

<control id=“sound_onoff” type=“plane-onoff” width=“42px” height=“34px” checked=“false” />


<panel heigth="
" width=“1000px” childLayout=“horizontal”>

<panel width=“72px”/>

<control id=“nigtday” type=“plane-nightday” width=“60px” height=“38px” checked=“true” />





In this layer there is a main panel “lightControlPanel” split vertically in 3 panels : first one with 10px height, second one with 20px height and the last one the remaining height. When I display this layout in jme3, the heights are ignored ! I can put any value i want, the result is always the same.

My initial code was to set the panel’s childLayout to absolute then set x and y for each control but it don’t work at all. All components are displayed at 0,0.

Have you an idea for one or both issue ?

Thanks a lot,


[xml] <panel heigth="20px" width="1000px" childLayout="horizontal">

<panel width="51px"/>

<control id="ambient_onoff" type="plane-onoff" width="42px" height="34px" checked="true" />

<panel width="23px"/>

<control id="sound_onoff" type="plane-onoff" width="42px" height="34px" checked="false" />


Im not sure but I think this part could be an issue since you have panel with a height of 20 px and 2 controls inside with a greater height.

You’ve miss spelled "height"in a couple of places. It says “heigth”


Haha, so my english is so bad !!! Miss spelled height, what a shame…

Thank you both for your answers. I will test this as soon I’m back to work (it’s a project for my company), now I’m on vacation :slight_smile:

So I will let you know next friday.


Hi all,

I have changed all “heigth” by “height” : it solves my issues ! Thanks a lot guys.