Trouble creating a ScrollPane with code

1 message, no reply - 338 views

When I try to build a page with code like this:

ScrollPane pane = new ScrollPane();
screen.add(pane);

After adding the scroll pane y add several text and textarea elements, but they do not appear.

I cannot scroll and the scrollbar is not visible. Setting it visible (pane.setShowScrollBar(true);) doesn't help at all.

 Until now I had no problem adding elements to the screen and displaying it but I need help to display the scrollbars, because I want to display a long text.

 

Thanks in advance,

dag