Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Need help with mouselistener and MouseMotionListener
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
RaLz




PostPosted: 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
{
Sponsor
Sponsor
Sponsor
sponsor
SsJBebiGoku




PostPosted: Wed Jan 12, 2005 10:08 pm   Post subject: (No 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.
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: