Transparent dragging component image as the drag icon in Swing

一曲冷凌霜 提交于 2019-12-12 01:14:27

问题


How can I set a quite large drag icon made by transparent dragging component image. So the user sees what has selected for dragging while dragging.

It'd better that the image has a graded transparent level so the bottom right of the component image will be 99% transparent and the top left of the componenet image will have 50% transparency. What I need is generating the image and converting it to an ImageIcon.

The component can be any thing. Even a complex one. For example a JPanel with some other components inside.

来源:https://stackoverflow.com/questions/20831078/transparent-dragging-component-image-as-the-drag-icon-in-swing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!