How can I make my Canvas object's background transparent when it is added to applet?

Scott Stanchfield

You can't -- Canvas is a heavyweight component, and obscures anything behind it. Instead of using Canvas as a superclass, use Component. Component allows you to create a lightweight component.

By using Component as the superclass, it will only obscure the things you actually paint over. Any non-painted pixels are "transparent" and you'll see the background.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact