public static boolean isFocused(@NotNull JComponent component) {
    if (isFocusedImpl(component)) return true;
    JComponent sibling = ClientProperty.get(component, FOCUSABLE_SIBLING);
    return sibling != null && isFocusedImpl(sibling);
  }
public static boolean isFocused(@NotNull JComponent component)