import java.awt.event.*; //grafisches Programm, Zufallszahlen
import java.awt.*;
import java.util.*;
public class a44 extends Panel implements ActionListener{
	Button b = new Button ("Lichtschalter");
	boolean lichtAn = false;
	Random r = new Random();
	
	public a44(){
		setBackground(Color.black);
		add(b);
		b.addActionListener(this);
	}
	public void actionPerformed(ActionEvent e){
		setBackground (new Color(Random(), Random(), Random()));
	}
	public static void main(String a[]){
		Frame Fenster = new Frame("Aufgabe 44");
		Fenster.add("Center", new a44());
		Fenster.addWindowListener(new WindowAdapter(){
			public void windowClosing(WindowEvent e) {System.exit(0); } } ) ;
		Fenster.pack();
		Fenster.setSize(300,300);
		Fenster.setVisible(true);
	}
	public int Random(){
		return r.nextInt(255);
	}
}