/**
 * @(#)TestScrollPane.java
 *
 * TestScrollPane application
 *
 * @author 
 * @version 1.00 2007/1/20
 */
 import java.awt.*;
 import java.awt.event.*;
public class TestScrollPane extends Frame
{
    public TestScrollPane()
    {
     TextArea ta=new TextArea("",10,50,TextArea.SCROLLBARS_NONE);
     ScrollPane sp=new ScrollPane(ScrollPane.SCROLLBARS_AS_NEEDED);
     add(sp);
     sp.add(ta);
     addWindowListener(new WindowAdapter()
     {
      public void windowClosing(WindowEvent e)
      {
       e.getWindow().dispose();
      }
     });
    }
    public static void main(String[] args) 
    {     
     // TODO, add your application code
     System.out.println("Hello World!");
     TestScrollPane mainFrame=new TestScrollPane();
     mainFrame.setTitle("TestScrollPane");
     mainFrame.setBounds(300,200,200,200);
     mainFrame.setVisible(true);
    }
}