String (Transferable content) { if (content != null) { try { return (String)content.getTransferData(DataFlavor.stringFlavor); } catch (UnsupportedFlavorException | IOException ignore) { } } return null; }