public static boolean isPasswordEditor(@Nullable Editor editor) {
    return editor != null && editor.getContentComponent() instanceof JPasswordField;
  }
public static boolean isPasswordEditor(@Nullable Editor editor)