TextField

A TextField is a simple scrollable text display object with one row of characters. The width of field is specified during construction and an initial string may be specified.



Corresponding source code:

import java.applet.*;
import java.awt.*;
public class TextFieldWidget extends Applet {
    public void init()
    {
        TextField f1 = new TextField("type something");
        add(f1);
    }
}

Method(s) of note:

Related Magercise(s):