You'll need to check focus, run your app again, then click your mouse on the
frame somewhere, re-size or move the window for instance. Your keyboard input
should work once the focus is back on the object with the keyListener.
Making a Frame a listener doesn't make all of it's sub-components listeners, so
you'll have to do a little thinking about where the focus may end up when you
want keyboard input. If you're using your mouse for instance to navigate the
Canvas3D you'll need the canvas to be a keyListener.
Also, as far as I know you can add your keylistener to as many AWT components
as you like. Or have more than one keyListener so some components use listenerA
and some use listenerB.
One more thing to look into is component methods like requestFocus(),
transferFocus(), hasFocus() addFocusListener().... there are many more
Hope this helps
ArtMotion wrote:
> I want to also use keys in my java3d application, but it seems i can't
> make them work...
>
> a normal programm with only a frame works just fine... but when i attach
> my keylistener to the frame in my java3d application it never is called
> ...
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff JAVA3D-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".