/** * Returns whether one of focusable childs is focused or not. * * @return true if one of focusable childs is focused, false otherwise */ public boolean isChildFocused() { for (final WeakReference<Component> focusableChild : focusableChilds) { final Component component = focusableChild.get(); if (component != null) { if (SwingUtils.hasFocusOwner(component)) { return true; } } } return false; }