OpenGL Component

While using OpenGL Component on Mac OS 10.4 , I noticed that overriding
void keyPressed (const KeyPress& key);
void keyStateChanged();
has no effect.
ie. control never gets in there on keyboard events.
Is this a bug or am I doing something Wrong.


did you call its setWantsKeyboardFocus() method? By default some components don’t take the focus unless you explicitly tell them to, and will only get keys sent to them if they have the focus.

Thanks, that was the problem.