Here is the code.
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
public class MouseEvents extends
Applet implements MouseListener, MouseMotionListener{
String msg="";
int mouseX = 0, mouseY = 0;
public void init() {
addMouseListener(this);
addMouseMotionListener(this);
}
public void mouseClicked(MouseEvent me) {
mouseX=0;
mouseY=10;
msg = "Mouse Clicked.";
repaint();
}
public void paint(Graphics g) {
g.drawString(msg, mouseX, mouseY);
}
}
Getting an error saying class MouseEvents must be declared abstract.
Could anyone throw some light on this?. Looks like the Interface is not getting implemented. How do I overcome this?.
Thanks,
[This message has been edited by Thunthu Ganapathy (edited May 10, 2000).]