Is there any method to see if a JComponent currently has focus?
Printable View
Is there any method to see if a JComponent currently has focus?
Hm, my magic eight ball tells me to look at the API for JComponent and its ancestors, and to search on the term "focus". It also hints that the key ancestor here is Component.
Great, thanks. I did a search in my particular component, but kind of stopped looking after the JComponent results... :/
Ah. Focus is a very primitive GUI concept so it makes sense to me that it would be handled by class high up in the ancestor hierarchy.