我是JAVA初学者,遇到了以下困难 望高手指点
import java.awt.*;import java.awt.event.*;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
public class three implements MouseMotionListener,MouseListener,WindowListener{
private Frame f;
private TextField tf;
public static void main(String args[]){
three thre=new three();
thre.go();
}
public void go(){
f=new Frame("我已经");
f.add(new Label("嘿嘿"),"North");
tf=new TextField(30);
f.add(tf,"South");
f.addMouseMotionListener(this);
f.addMouseListener(this);
f.addWindowListener(this);
f.setSize(300,200);
f.setVisible(true);
}
public void mouseDragged(MouseEvent e){
String s="Mouse dragging : X="+e.getX()+"Y = "+e.getY();
tf.setText(s);
}
public void mouseMoved(MouseEvent e){}
public void mouseClicked(MouseEvent e){}
public void mouseEntered(MouseEvent e){
String s="The mouse Entered";
tf.setText(s);
}
public void mouseExited(MouseEvent e){
String s="The mouse has lefed the buiding";
tf.setText(s);
}
public void mousePressed(MouseEvent e){}
public void mouseReleased(MouseEvent e){}
public void WindowClosing(WindowEvent e){
System.exit(1);
}
public void WindowOpened(WindowEvent e){}
public void WindowIconified(WindowEvent e){}
public void WindowDeiconified(WindowEvent e){}
public void WindowClosed(WindowEvent e){}
public void WindowActivated(WindowEvent e){}
public void WindowDeactivated(WindowEvent e){}
}
编译时出现以下错误
three.java:5: three 不是抽象的,并且未覆盖 java.awt.event.WindowListener 中的抽
象方法 windowDeactivated(java.awt.event.WindowEvent)
public class three implements MouseMotionListener,MouseListener,WindowListener{