Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet Background(URGENT)

 
Angela Jessi
Ranch Hand
Posts: 428
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Karen Parker
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...

-Nate
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic