代码如下
import java.awt.*;
import java.awt.event.*;public class ActionEventDemo1 implements WindowListener{
Frame f=new Frame("ActionEventDemo1");
Label msg=new Label("你的姓名:",Label.CENTER);
TextField name= new TextField(20);
TextField output=new TextField(50);
Button bConfirm=new Button("确定");
Button bReset=new Button("重置");
Listener lsn=new Listener(this);
public ActionEventDemo1(){
f.setLayout(null);
f.add(msg);
f.add(name);
f.add(output);
f.add(bConfirm);
f.add(bReset);
msg.setBounds(20,40,120,20);
name.setBounds(140,40,140,20);
output.setBounds(20,80,260,20);
bConfirm.setBounds(190,110,70,20);
bReset.setBounds(190,110,70,20);
f.setSize(300,150);
f.setVisible(true);
name.addActionListener(lsn);
bConfirm.addActionListener(lsn);
bReset.addActionListener(lsn);
f.addWindowListener(this);

}
public static void main(String[]args){
new ActionEventDemo1();

}
public void windowActivated(WindowEvent e){}
public void windowDeactivated(WindowEvent e){}
public void windowIconified(WindowEvent e){}
public void windowDeiconified(WindowEvent e){}
public void windowOpened(WindowEvent e){}
public void windowCloser(WindowEvent e){}
public void windowClosing(WindowEvent e){

System.exit(0);
}
}
每次编译都报错,说ActionEventDemo1 不是抽象,并且不能覆盖,java.awt.event.WindowListeActionEventDemo1.java
请高手指教一下,谢谢了、