/*
03.14.00
Widget Demo from Class
*/
import java.awt.*;
import java.applet.Applet;
public class Widget extends Applet
{
Font f ;
Button b;
Label l;
TextField t;
public void init( )
{
f = new Font("Serif", Font.BOLD + Font.ITALIC, 18);
b = new Button("Example Button");
b.setBackground(Color.red);
b.setForeground(Color.white);
b.setFont(f);
l = new Label("Example Label");
l.setBackground(Color.green);
l.setForeground(Color.red);
l.setFont(f);
t = new TextField("Enter Text Here", 24);
t.setBackground(Color.blue);
t.setForeground(Color.white);
t.setFont(f);
add(t);
add(b);
add(l);
}
}
S