wood burning stoves 2.0*
The moose likes Applets and the fly likes how to set applet transparent? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "how to set applet transparent?" Watch "how to set applet transparent?" New topic

how to set applet transparent?

Simon Xu
Ranch Hand

Joined: Aug 16, 2000
Posts: 235
my applet is embedded in the HTML file. The HTML has a .jpg file as background color. How to set applet transparent without any color.
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

You cannot make the background of an applet transparent... you can however, make it display your background image within the applet ( just pass the graphic in and do a drawImage() in paint, and then display the rest of your applet over it... ). However, in most cases this is not a satisfactory solution, since the applet will not line its background up with the background of the browser.

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Simon Xu
Ranch Hand

Joined: Aug 16, 2000
Posts: 235
hi, Nathan
Thanks for your reply. It helps.
I agree. Here's the link: http://aspose.com/file-tools
subject: how to set applet transparent?
Similar Threads
applet transparency
setting applet's background color
JTree not updating after removing node and cant get background to change...
reg applet