The ScrollPanel is a div-based widget that lets you add scroll bars to the panel.
The following is the sample code do declare a GWT ScrollPanel and display in the RootPanel.
String data = "Scroll panel will display the below data. Scroll panel will display the below data.
Scroll panel will display the below data.
Scroll panel will display the below data. Scroll panel will display the below data.
";
ScrollPanel scrollPanel = new ScrollPanel(new HTML(data));
scrollPanel.setSize("200px", "120px");
RootPanel.get("sample-demo").add(scrollPanel);
In the above code, we have set the ScrollPanel size as "200px" width and "120px" height.
No comments:
Post a Comment