i want to copy image and text together to clipboard at same time but i can copy image or text
//class to copy text
StringSelection selection=new StringSelection(text);
c.setContents(selection, null);
//class to copy image
ImageTransferable s=new ImageTransferable(image);
开发者_Python百科 c.setContents(s, null);
You'll need to use a custom Transferable object:
http://www.coderanch.com/t/345580/GUI/java/Cut-copying-pasting-custom-object
精彩评论