boolean (String text, String originalText) { try { return new TextBlockTransferable(unescapeStringCharacters(originalText), Collections.emptyList(), null) .getTransferData(DataFlavor.stringFlavor).equals(text); } catch (Exception e) { throw new RuntimeException(e); // shouldn't happen } }