FileDocCategorySizeDatePackage
ScrollingSimple.javaAPI DocExample990Tue Dec 12 18:57:26 GMT 2000None

ScrollingSimple

public class ScrollingSimple extends Applet

Fields Summary
TextField
field
Constructors Summary
Methods Summary
voidaddItem(java.lang.String newWord)

        String t = field.getText();
        System.out.println(newWord);
        field.setText(t + newWord);
    
public voiddestroy()

        addItem("preparing for unloading...");
    
public voidinit()

        //Create the text field and make it uneditable.
        field = new TextField();
        field.setEditable(false);

        //Set the layout manager so that the text field will be
        //as wide as possible.
        setLayout(new java.awt.GridLayout(1,0));

        //Add the text field to the applet.
        add(field);
        validate();  //this shouldn't be necessary

        addItem("initializing... ");
    
public voidstart()

        addItem("starting... ");
    
public voidstop()

        addItem("stopping... ");