Transparent Applet

Posted on 1998-02-26
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
Question by:younggun
  • 3
  • 2
  • 2
  • +1

Expert Comment

ID: 1233272
That is not possible, at least not that I know of.

Expert Comment

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

Author Comment

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.

Expert Comment

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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!


Author Comment

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

Expert Comment

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.

Accepted Solution

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

Author Comment

ID: 1233279

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
topping3 challenge 14 50
java set up 1 46
Running Jira on Raspberry PI 2? 3 130
Java Jpanels and Jframe 8 20
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
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 about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now