We help IT Professionals succeed at work.

How to make transparent backgroud in Java

hcyu
hcyu asked
on
256 Views
Last Modified: 2010-04-16
Now, I want to make the background color of my applet to be transparent with the background color of my HTML file. That means if the background color of my applet is blue while that of my HTML is red. I want there is on blue rectangular seen on web page. How can I do this? Of course, I can select the same color, but I want to have another alternative due to some reasons.
Comment
Watch Question

Commented:
To the best of my knowledge tranparency was only introduced at JDK 1.1 and even than only when you inherit from Component or Container, since Applet is derived from Panel (AFAIR) you cannot get tranparency from an Applet.

Commented:
Do you mean that the background color of the Web page should impose the background
color of the applet or that the background color of the applet should impose the background
color of the HTML?
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Commented:
"Pure" Blue : 0000FF
"Pure" Red:  FF0000
"Pure" Green: 00FF00
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.