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!

How to always focus on the JFrame

843807Jan 8 2010 — edited Jan 8 2010
Hi,

I have a JFrame which implements KeyListenter to wait for keyboard listener. It seems to be working nicely, But when I click another button or textfield. It kinds of lose focus in that JFrame. I have to use requestFocus at the end of the code everytime. Is there any way to always get back to JFrame everytime automatically?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 5 2010
Added on Jan 8 2010
3 comments
1,384 views