/* File:	lightApplet.java
   Author:	Mohammadi
   Last Update: 01/19/01
*/
import java.awt.*;
import java.awt.event.*;

import java.applet.*;

/**	This is a light applet that you can control with a switch 
        button.  
 **/

   public class lightApplet extends Applet implements ActionListener{
     protected Button switch_;
     protected light l_;

     public lightApplet () {
       switch_ = new Button("Switch");
       switch_.setForeground(Color.black);
       switch_.setBackground(Color.lightGray);
       switch_.addActionListener(this);

       l_ = new light();
       setBackground(Color.black);
     }
     public void init() {     
       add(switch_);
       add(l_);
     }

     public void actionPerformed(ActionEvent event) {
      // change light
        l_.change();
     }

   }
