求助高手
我按照课本得例子上得程序,说MultiListener不是抽象得,且未覆盖java.awt.event.MouseListener中得抽象方法mouseExited(java.awt.event.MouseEvent),怎么出现这种情况啊,是哪边得问题啊?import java.awt.*;
import java.awt.event.*;
public class MultiListener implements MouseListener,MouseMotionListener,WindowListener
{
private Frame f;
private TextField tf;
public static void main(String[] args)
{
MultiListener ml=new MultiListener();
ml.go();
}
public void go()
{
Frame f=new Frame();
f.add(new Label("单击和拖动鼠标"),"north");
tf=new TextField(30);
f.add(tf,"south");
f.addMouseListener(new MouseAdapter(){
public void mouseEntered(MouseEvent e)
{
String s="Yhe Mouse Entered";
tf.setText(s);
}
});
f.addMouseMotionListener(new MouseMotionAdapter(){
public void mouseDragged(MouseEvent e)
{
String s="Yhe Mouse Dragging";
tf.setText(s);
}
});
f.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e)
{
System.exit(0);
}
});
f.resize(200,200);
f.setVisible(true);
}
}