Computer Science Canada

Need help with mouselistener and MouseMotionListener

Author:  RaLz [ Wed Jan 12, 2005 1:02 pm ]
Post subject:  Need help with mouselistener and MouseMotionListener

Hi I am trying to get mouse input to work but i keep getting this error when i try to implement MouseListener and MouseMotionListener.
code:
The abstract method "void mouseReleased(java.awt.event.MouseEvent $1);'.Inherited from type "java.awt.event.MouseListener", is not implemented is the non-abstract class "Game".


This is where the the error is occuring.

code:

import java.applet.*;
import java.awt.*;
import java.awt.image.*;
import java.event.MouseEvent;
import java.event.MouseListener;
import java.event.MouseMotionListener;

public class Game extends Applet implements Runnable, MouseMotionListener, MouseListener // right here is where the error occurs
{

Author:  SsJBebiGoku [ Wed Jan 12, 2005 10:08 pm ]
Post subject: 

I'm pretty sure you have to create a mouseReleased(MouseEvent e) method in your program, and code anything you want to happen when the mouse does the desired action.


: