Nifty java code to add panel?

Element layer = screen.getLayerElements().get(0);
layer.add( ? );

Is it possible to add panels to a nifty screen runtime? Or possible to assemble the elements of the screen before it is loaded into jme and displayed to the user?
I am attempting to construct part of the the panels/controls with a for loop. But all of the nifty java examples that I could find finish adding all (screens, layers, panels) during a single call to “nifty.addScreen()”.

Yes it’s possible, I refer you to the almighty bible:

It talks about Java builders quite near the beginning

1 Like

yes… found it.

Looked everywhere but the manual, and apparently at the wrong nifty API pages (“Nifty Controls” rather than “Nifty”)

1 Like