Problem with dynamic window

Hey guys,

I have a problem with dynamically adding a new window element to the layer.

I do it using java api.


WindowBuilder windowBuilder = new WindowBuilder(“wnd”, “title”);“nifty-window”);





windowBuilder.height(“50px”);, nifty.getCurrentScreen(), nifty.getCurrentScreen().findElementByName(“window-layer”));


There are no exceptions and no warnings.

What I see are the last two letters of the word ‘title’ that is on the window title bar.

And they appear on the left top part of the screen.

The layer “window-layer” it the most front layer of the screen and it is there.

The layer has the ‘absolute’ child layout applied.

The style is correctly loaded because I was able to change the font color of the window text in title bar.

But I have no idea what am I doing wrong and why I cannot see the window :confused:


It doesn’t work for neither nifty 1.3.1, 1.3.4 nor 1.4.0.

No solution to that ?? :frowning:

If I gave too few info about the problem just let me know.

I tried your WindowBuilder code above on a layer with width=“100%” height=“100%” and childLayout=“absolute” and it worked as expected.

How big is your window-layer?

The layer is 100% in both width and height.

I applied a color to it and it was rendered all over the visible area as expected.

OK I solved it.

Turned out that I didn’t set the window-layer child layout by a mistake.

Sorry for the disturbance :wink: