Scroll Panel

The ScrollPanel is a div-based widget that lets you add scroll bars. That's pretty much all it does. It can contain only one widget

Reference:

Example Demo:

Example Code:

function doGet() {

  var app = UiApp.createApplication();

//Create Scroll Panel

  var scrollPanlel = app.createScrollPanel().setSize('300', '200')

      .setStyleAttribute('border', '1px solid black');

//create a vertical panel which will be contained by scroll panel

  var vPanel = app.createVerticalPanel();

//Add some widgets to the vertical panel

//Here, I have added label widgets

  for(var i=1; i<21; i++){

    vPanel.add(app.createLabel('This is line '+i));

  }

//Add the vertical panel to scroll panel

  scrollPanlel.add(vPanel);

//Add the scroll panel to the application

  app.add(scrollPanlel);

  return app;

}