import java.applet.Applet;
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.

public class ColorTextComponents extends Applet {
  public void init() {
    TextField field =
      new TextField("Red BG, Yellow FG");
    field.setBackground(Color.red);
    field.setForeground(Color.yellow);
    add(field);
    TextArea area =
      new TextArea("Yellow BG\nRed FG", 2, 15);
    area.setBackground(Color.yellow);
    area.setForeground(Color.red);
    add(area);
  }
}

