• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to find the component which has focus?  RSS feed

 
Thyagarajan Ramanujam
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any way to find the component which currently has focus in a swing form?

I know that it is possible to find whether a component is having focus or not. I could not find a direct way to solve this? Can any one help to sort out this?
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
KeyboardFocusManager#getFocusOwner()
 
Campbell Ritchie
Sheriff
Posts: 53779
128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thyagarajan K R please check your private messages about an important administrative matter.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!