I inserted background as an image in my HTML file in while I also downlad applet. After downloading of the applet, background image cuts off. How Can I make applet background transperant so I can see the value and labels of applet with HTML background image.Rigth now I am using applet background color white. Thanks Angela
Joined: May 16, 2001
I don't think it is possible to make an applet's background "transparent" so you can see the background of the HTML page behind it. There may, however, be a way to use the same background image within the applet to give that appearance. If you're using Swing and your components are on a JPanel, I *think* you could draw the image on the JPanel, and it should appear underneath your components. I'm not much of an expert on Swing so someone please correct me if this is wrong. Unfortunately, if you're using AWT, I can't think of any simple way to achieve the same effect...
Override the paint() method of the applet and draw the image there... Applet extends the AWT panel... of course, if you are tiling an image, it doesn't always line up correctly in the applet and in the webpage background...
Write once, run anywhere, because there's nowhere to hide! - /. A.C.