File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "how to set applet transparent?" Watch "how to set applet transparent?" New topic
Author

how to set applet transparent?

Simon Xu
Ranch Hand

Joined: Aug 16, 2000
Posts: 235
hi,
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.
Thanks
Simon
Nathan Pruett
Bartender

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.
HTH,
-Nate


-Nate
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.
Simon
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to set applet transparent?
 
Similar Threads
applet transparency
JTree not updating after removing node and cant get background to change...
Transparancy
reg applet
setting applet's background color