Reputation: 21865
I'm using Jogl 2.0 , and when I try to do
public class Walking3D implements GLEventListener, KeyListener {
@Override
public void init (GLAutoDrawable gLDrawable)
{
// some code
gLDrawable.addKeyListener(this);
}}
I get : The method addKeyListener(Walking3D) is undefined for the type GLAutoDrawable
But in Jogl 1.0 it works fine .
What's wrong with it ?
Thanks
Upvotes: 0
Views: 349
Reputation: 21865
Okay , I fixed it with this :
((Component) gLDrawable).addKeyListener(this);
Upvotes: 1