I am trying to create a simple text editor in Java for my website. When attempt to paste content from the clipboard (using the source shown below) I am getting the following exception:
: access denied
From a Google search I have been led to believe that it is possible to sign the applet so that it gains the required permission. Or perhaps there is another way I can do this?
If it's of any difference, I use JCreator for creating Java applets.
Clipboard clipboard = getToolkit().getSystemClipboard();
Transferable clipboardContent = clipboard.getContents(this);
if (clipboardContent != null && clipboardContent.isDataFlavorSupported (DataFlavor.stringFlavor))
result = (String)clipboardContent.getTransferData(DataFlavor.stringFlavor);