Need help implementing a Scroll Panel in Java

I’m working on a settings screen that will have a variable amount of options for the user. I want to nest these options in a scroll panel so that I can keep the size of the settings screen constant. Is this possible to do through Java?

I’ve been trying to use the ScrollPanelBuilder to do this but it doesn’t seem to be possible. The ScrollPanelBuilder can’t actually set attributes of a scroll panel, it can only effect the things its ElementBuilder parent can. On top of that, when I try to add controls as children of the scroll panel (the wiki showed an example with an image, but I was trying more) only the first child appears.

I’ve been searching the web for an hour or two now looking for a solution, but there unfortunately isn’t a lot out there.

Since someone will most likely ask, here’s an example of what I’m trying to do.

[java]control(new ScrollPanelControl(“id”) {{
control(new LabelBuilder(“Hello 1”));
control(new LabelBuilder(“Hello 2”));
control(new LabelBuilder(“Hello 3”));

You can check this project
It contains scrollPanel through XML.

You can add the panel through XML, but put all components through JAVA.

Possibly it will help you in some way. :slight_smile: