public static @Nullable AbstractAction getNewLineAction(Component c) {
    if (!isSearchField(c)) return null;
    Object action = ((JTextField)c).getClientProperty("JTextField.Search.NewLineAction");
    return action instanceof AbstractAction ? (AbstractAction)action : null;
  }
public static @Nullable AbstractAction getNewLineAction(Component c)