code: public void pasteClipboard() {
          Transferable t = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null);
          try {
              if (t != null && t.isDataFlavorSupported(DataFlavor.stringFlavor)) {
                  addContents((String) t.getTransferData(DataFlavor.stringFlavor));
                  table.repaint();
              }
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
docs: this is the function that adds the clipboard contents to the table