create an hotspot and set an image without background (like earth icon) to my panel

Posted by sirvan on Stack Overflow See other posts from Stack Overflow or by sirvan
Published on 2010-05-12T13:37:59Z Indexed on 2010/05/12 13:44 UTC
Read the original article Hit count: 202

Filed under:
|
|
|

Hi

I try to create an hotspot by Extends of canvas and I try to add it on a panel witch painted by images , so I must to draw an icon (image) instead of clear rectangle of the screen, to do that I override the paint method to draw the icon I want to use, so far there is no problem, the hotspot work true and the icon painted in true size I want(32,24 pixel)
I try to add this hotspot after painting image on the my panel in mypanel.paint(g) that override too.

The problem , I use an car icon that have no background !!(I hope you can understand me) just car icon must be show on the panel that painted with my images; But an unwanted rectangle created around the icon and made bad view, How I can paint may icon on panel without that background? Please help me.

© Stack Overflow or respective owner

Related posts about java

Related posts about swing