how to paste image through system clipboard
843807Oct 28 2001 — edited Jan 5 2004hi,
I must copy a image from java application to another graphic application such as photoshot. I think I must paste the image to system clipboard.
I can copy/paste a image by a clipboard made by myself(e.g. Clicpboard clipboard = new Clipboard("MyClicpboard"))). but I have no idea how to do it with system clipboard. below is the exception i can not get rid of:
java.lang.ClassCastException: [I
at sun.awt.windows.WDataTransferer.translateTransferable(WDataTransferer.java:390)
at sun.awt.DataTransferer.translateTransferable(DataTransferer.java:245)
at sun.awt.windows.WClipboard.setContents(WClipboard.java:69)
at Test.<init>(Test.java:40)
at Test.main(Test.java:12)
please give me some advise.
thanks in advance!