keyListener help!!


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: keyListener help!!

  1. #1
    Join Date
    Sep 2003
    Posts
    3

    keyListener help!!

    hi,
    I am tring to add a key listener to my java 3D class by using this code

    Code:
     public class SpinnerGame extends Applet implements KeyListener{
    But when i try to compile it says

    SpinnerGame is not abstract and does not override abstract method keyTyped(java.awt.event.KeyEvent) in java.awt.event.KeyListener

    what does this mean??? so fustrating

  2. #2
    Join Date
    Mar 2003
    Posts
    834

    Post

    1. You've declared the class as implementing the interface KeyListener.

    2. The Keylistener interface defines three methods:

    (i) keyTyped
    (ii) keyPressed
    (iii) keyReleased

    http://java.sun.com/j2se/1.3/docs/ap...yListener.html

    3. Your class does not fulfill this interface, not providing a definition for method 'keyTyped'

    http://java.sun.com/j2se/1.3/docs/ap....html#keyTyped(java.awt.event.KeyEvent)
    ArchAngel.
    O:-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center