//Hangman 1
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.awt.Color;

public class Hangman1 extends Frame implements ActionListener
{
	TestColorPanel N,W,E,S,C;
		
	public Hangman1()
	{
		super("Hangman Version 1");
		setSize(600,650);
		//Activates the "close" button	
		addWindowListener(new BasicWindowMonitor());
		
		N = new TestColorPanel(Color.green);
		E = new TestColorPanel(Color.cyan);
		S = new TestColorPanel(Color.yellow);
		W = new TestColorPanel(Color.red);
		C = new TestColorPanel(Color.blue);
		
		add(N,BorderLayout.NORTH);
		add(E,BorderLayout.EAST);
		add(S,BorderLayout.SOUTH);
		add(W,BorderLayout.WEST);
		add(C,BorderLayout.CENTER);

		setVisible(true);

	}
	
	public void actionPerformed(ActionEvent ae)
	{
		System.out.println("Hangman: "+ae.getActionCommand());
		repaint();

	}
	
	public void paint(Graphics g)
	{
		super.paint(g);
	}
	
	public static void main(String args[])
	{
		Hangman1 hm1 = new Hangman1();
		hm1.setVisible(true);

		
	}
}
