code: public static void setContnent(String content) {
          Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
          try {
              StringSelection selection = new StringSelection( content );
              clipboard.setContents(selection, selection);
          } catch (Exception ex) {
              //noop
          }
      }
docs: Sets the content to the {@link Clipboard}.
  @param content