I have the following:
[java]
//create panel
Element panel = new PanelBuilder(id) {
{
width(“100%”);
padding(“10px”);
childLayout(ChildLayoutType.Horizontal);
}
}.build(app.nifty, screen, layer);
[/java]
And I get a NullPointerException.
I have the following:
[java]
//create panel
Element panel = new PanelBuilder(id) {
{
width(“100%”);
padding(“10px”);
childLayout(ChildLayoutType.Horizontal);
}
}.build(app.nifty, screen, layer);
[/java]
And I get a NullPointerException.
I solved it. Apparently the app.nifty variable wasn’t instantiated correctly.
I’m just bad at java