private static boolean kindaHasFocus(@NotNull Component component) {
    JComponent jComponent = component instanceof JComponent ? (JComponent)component : null;
    return jComponent != null && Boolean.TRUE.equals(jComponent.getClientProperty(HAS_FOCUS));
  }
private static boolean kindaHasFocus(@NotNull Component component)