How do I find out which JComponent has the current focus

I see myJComponent.requestFocusInWindow();but I can't see anything like JComponent focusIsOn = myJContainer.getFocus();
[141 byte] By [simon_orangea] at [2007-11-27 6:51:57]
# 1
never done this, but maybe:FocusManager.getCurrentManager().getFocusOwner();
Nethera at 2007-7-12 18:26:31 > top of Java-index,Desktop,Core GUI APIs...
# 2
In JDK1.4 the FocusManager was replaced by the KeyBoardFocusManager and I believe you would use:KeyBoardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
camickra at 2007-7-12 18:26:31 > top of Java-index,Desktop,Core GUI APIs...