code: private void buttonPasteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonPasteActionPerformed
      try {
        this.editorPane.replaceSelection((String) Toolkit.getDefaultToolkit().getSystemClipboard().getData(DataFlavor.stringFlavor));
      } catch (UnsupportedFlavorException ex) {
        // no text data in clipboard
      } catch (IOException ex) {
        LOGGER.error("Error during paste from clipboard", ex); //NOI18N
      }
    }
docs: GEN-LAST:event_buttonCopyActionPerformed