Solved

Transparent Applet

Posted on 1998-02-26
8
333 Views
Last Modified: 2008-02-01
is it possible have a applet that is transparent and how do i do it?
i mean u are able to see the web page behind the applet
0
Comment
Question by:younggun
  • 3
  • 2
  • 2
  • +1
8 Comments
 

Expert Comment

by:prg022698
ID: 1233272
That is not possible, at least not that I know of.
0
 
LVL 1

Expert Comment

by:dbogstad
ID: 1233273
When a web browser displays an applet it actually gives up control of that displayed area to the applet. If the applet asks for a 300 by 200 area of pixels within a web page it gains complete control of that area. If it didn't have complete control the browser could violate the operations of that applet.

However, you could cheat, and display the background color of the webpage as the background color of the applet. Setting the background color of your applet could be the first thing your applet does in its init() method.

good luck
0
 

Author Comment

by:younggun
ID: 1233274
sorry, maybe i phase the question worngly
what i mean is that u can see the background image of the web
page through the applet.
please don't tell me to cut part of the web page background image
and use as the applet background.
thanks
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 6

Expert Comment

by:jpk041897
ID: 1233275
You would not necesaraly have to "cut" the graphic, you could load the background graphics using imageloader and display only a part of it as the background for your applet.

The solution is messy, forcing you to override the paint() method but is currently the ony solution that will work.

The main problem with such a solution is that it will not diplay text that is drawn by HTML tags behind the applet
0
 

Author Comment

by:younggun
ID: 1233276
but i would have to know before hand where the applet is located in the web page in order to know which part of the background to display
0
 
LVL 6

Expert Comment

by:jpk041897
ID: 1233277
Correct, although you could work arround the limitation by either sending the applets coordinates in the web page as paramters to the applet via HTML, or by creating the frame that contains the applet via JScript and passing the parameters via interapplet communication.
0
 
LVL 1

Accepted Solution

by:
dbogstad earned 50 total points
ID: 1233278
The answer to your question is definitely no
0
 

Author Comment

by:younggun
ID: 1233279
thanks
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

789 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