import java.awt.*;

// This appears in Core Web Programming from
// Prentice Hall Publishers, and may be freely used
// or adapted. 1997 Marty Hall, hall@apl.jhu.edu.

/** Places a Panel holding 100 buttons in a ScrollPane
 *  that is too small to hold it. Java 1.1 only.
 */

public class ScrollPaneTest extends CloseableFrame {
  public static void main(String[] args) {
    new ScrollPaneTest();
  }

  public ScrollPaneTest() {
    super("ScrollPane Test");
    ScrollPane pane = new ScrollPane();
    Panel bigPanel = new Panel();
    bigPanel.setLayout(new GridLayout(10, 10));
    for(int i=0; i<100; i++)
      bigPanel.add(new Button("Button " + i));
    pane.add(bigPanel);
    add("Center", pane);
    setSize(300, 300);
    setVisible(true);
  }
}
