Skip to content

Scroll Panel

Extends Panel and implements ScrollableElement.

The scroll panel is a scrollable version of the panel.

When the scroll panel overflows, the right padding will change to the scroller width + the overflow padding, if it is greater.

Builders:

Builder methods:

  • scrollerWidth: The scroller width.
    • getter / setter
  • overflowPadding: The overflow padding.
    • getter / setter

Example:

Window window = client.getWindow();
int width = window.getScaledWidth();
int height = window.getScaledHeight();
ScrollPanel panel = ScrollPanel.builder()
.dimensions(width, height)
.alignCenter()
.padding(10)
.spacing(10)
.build();
panel.addChild(anElement);