import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Hua_Rong_Road {
/**
* @param args
*/
public static void main(String[] args) {
// TODO 自动生成方法存根
new Hua_Rong_Road1();
}
}
class Person extends JButton implements FocusListener
{
int number;
ImageIcon c;
Person(int number,ImageIcon c)
{
super(c);
this.c=c;
this.number=number;
addFocusListener(this);
}
public void focusGained(FocusEvent e)
{
setBackground(Color.red);
}
public void focusLost(FocusEvent e)
{
}
}
class Hua_Rong_Road1 extends Frame implements MouseListener,KeyListener,ActionListener
{
Person person[]=new Person[10];
Button left,right,above,below;
Button restart=new Button("重新开始");
public Hua_Rong_Road1()
{
init();
setBounds(100,100,320,380);
setResizable(false);
setVisible(true);
validate();
addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
System.exit(0);
}
}
);
}