简体   繁体   中英

How to right click / copy an image from a JLabel

I was wondering if it was possible to be able to allow the user to copy an image from a JLabel?

If so could someone please tell me what I need to search for in the java docs please.

Thanks

With some effort: yes. You need to define an action on that label so that if the user clicks on it, an image is copied into the clipboard.

Further Reading

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM