/***************************************************************************** ScrollTest.java An applet to demonstrate & test Scroller.java bruce.miller@nist.gov (NIST is a part of the US Government; software is therefore not subject to copyright) ******************************************************************************/ package test; import java.applet.*; import java.awt.*; import gui.*; public class ScrollTest extends Applet { public void init() { setLayout(new StackLayout(StackLayout.VERTICAL)); add("CenterTop",new Label("Top")); Panel p = new Panel(), panel = new Panel(); p.setLayout(new StackLayout(StackLayout.HORIZONTAL)); p.add("LeftCenter",new Label("Left")); p.add("Fill",new Scroller(panel)); p.add("LeftCenter",new Label("Right")); add("Fill",p); add("CenterTop",new Label("Bottom")); panel.add(new Button("One")); panel.add(new Button("Two")); panel.add(new Button("Three")); panel.add(new Button("Four")); panel.add(new Button("Five")); List list = new List(20,false); for(int i=0; i<30; i++) list.addItem("Item #" + i); panel.add(list); } }