开发者

Is there a container that takes shape of an image or icon?

开发者 https://www.devze.com 2022-12-25 07:11 出处:网络
I have an ImageIcon which is an image of a router. I added this ImageIcon to a label. But labels are either rectangles or squares. I开发者_StackOverflow want such a component that takes the shape of t

I have an ImageIcon which is an image of a router. I added this ImageIcon to a label. But labels are either rectangles or squares. I开发者_StackOverflow want such a component that takes the shape of the ImageIcon when added to it. Does such a component exist? Is there any other way of doing it?


Yes label is rectangular but it is transparent by default( call setOpaque( false ) if it isn't ). Isn't that what you want?

0

精彩评论

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