Solved

transparent canvas

Posted on 1997-10-13
2
881 Views
Last Modified: 2012-06-21
I have an applet with a panel.  I add canvas' to it, and I use the mouseDrag method to allow the user to move the graphics around the "desktop".  I couldn't use the mouseDrag if I didn't use the canvas.  But now I have to put transparent gifs in for graphics, but you only see the background of the canvas that the image is in through the transparency of the gif.  Is there any way to have the canvas be transparent so I can see the other images through the transparencies?

Seth
0
Comment
Question by:seth23
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
mnelson051997 earned 100 total points
ID: 1228524
The way to have a transparent component is to use
the Component class instead of Canvas.  Using
Component means there is no peer involved, so if
you don't paint in an area, and update() is not
filling in the background, you see straight through.
This is what the JDK 1.1 calls a "lightweight"
component.
0
 

Author Comment

by:seth23
ID: 1228525
I am waiting to grade this.  I just asked another question about this problem, having to do with a problem that arises when I make the canvas into a component, and I can't test the transparency problem until the other problem is fixed.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
The viewer will learn how to implement Singleton Design Pattern in Java.

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question