开发者

how to copy image and text to clipboard using Java?

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜