public static JComponent getPreferredFocusedComponent(@NotNull JComponent component) {
    return getPreferredFocusedComponent(component, null);
  }
public static JComponent getPreferredFocusedComponent(@NotNull JComponent component)