Using ScrollPanel : ScrollPanel « GWT « Java






Using ScrollPanel

package com.java2s.gwt.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.ScrollPanel;

public class GWTClient implements EntryPoint{
  public void onModuleLoad() {
    HTML contents = new HTML("This is a <code>ScrollPanel</code>."+
                             "This is a <code>ScrollPanel</code>."+
                             "This is a <code>ScrollPanel</code>."+
                             "This is a <code>ScrollPanel</code>."+
                             "This is a <code>ScrollPanel</code>.");
    ScrollPanel scroller = new ScrollPanel(contents);
    scroller.setStyleName("layouts-Scroller");
    RootPanel.get().add(scroller);
  }
}



           
       








GWT-scrollPanel.zip( 2 k)

Related examples in the same category