Reputation: 2216
Just curious, how would you use key bindings with the openGL GLCanvas? I understand how to use them with JPanel (which applies to GLPanel) but is it possible to use it with GLCanvas? How would you do it if it is possible?
-Dan
Upvotes: 2
Views: 197
Reputation: 285460
(OK, I just now looked up the GLCanvas API)
Q: What does GLCanvas extend?
A: Canvas, an AWT component.
Q: Does AWT have key bindings?
A: No. So the overall answer is you can't use Key Bindings directly with GLCanvas.
Perhaps it can be used indirectly by attaching the bindings to another Swing component in the same GUI.
Upvotes: 3