Hi all,
firstly please advise if I've posted incorrectly as this is my first post.
Consider the following files :
Grandparent - public class
Parent - public abstract class extends Grandparent
Child - public abstract class extends Parent
I cannot change the class type or extensions in these files as these are a structure I did not create.
My issue is I am trying to create a KeyListener in a subclass of Child - I'll call Egg:
import java.awt.event. KeyListener
Egg public class extends Child implements KeyListener
I have tried various ways of achieving this:
- addKeyListener( keyListener)
- KeyListener listener = new KeyListener()
but end up with a "symbol not found ....KeyListener " when compiling.
I can create a working key listener in it's own separate file, I just can't seem to get it into this structure.
Any suggestions ?
And as I said please point out if I am posting incorrectly.
Thank you.
firstly please advise if I've posted incorrectly as this is my first post.
Consider the following files :
Grandparent - public class
Parent - public abstract class extends Grandparent
Child - public abstract class extends Parent
I cannot change the class type or extensions in these files as these are a structure I did not create.
My issue is I am trying to create a KeyListener in a subclass of Child - I'll call Egg:
import java.awt.event. KeyListener
Egg public class extends Child implements KeyListener
I have tried various ways of achieving this:
- addKeyListener( keyListener)
- KeyListener listener = new KeyListener()
but end up with a "symbol not found ....KeyListener " when compiling.
I can create a working key listener in it's own separate file, I just can't seem to get it into this structure.
Any suggestions ?
And as I said please point out if I am posting incorrectly.
Thank you.
Comment