Solved

Transparent Applet

Posted on 1998-02-26
8
330 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

821 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