Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Adding a KeyListener to a JPanel

843804Jun 5 2005 — edited Jun 5 2005
I have a JPanel (lets call it mainpanel) with 4 JPanel's inside, and inside this JPanel's i have JButtons, TextArea's etc. Is it possible to add only one KeyListener to the mainpanel, that would work even, if one of the JButtons or other components is focused, or have i to add the listener to all components in the Panel??
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 3 2005
Added on Jun 5 2005
2 comments
301 views