How can I set a Java applet transparency to show contents behind it?

Posted by yuri on Stack Overflow See other posts from Stack Overflow or by yuri
Published on 2010-05-05T12:35:45Z Indexed on 2010/05/05 12:38 UTC
Read the original article Hit count: 355

Filed under:
|
|
|
|

I've got a web page with an applet inside. This applet is a drop target on a drag and drop action from the OS, I simply take an image from a folder, drag it on the applet and something happens.

I give this webpage to a graphic designer and he ask to if he can put an image behind the java applet so he can simulate to change the background using CSS (it is a skinned app and graphic design can change during execution).

Practically i supposed to do:

<div>
    <applet width="50" height="50" />
</div>

with this CSS:

div {
    width:50px;
    height:50px;
    background-image: url(image.jpg) center center no-repeat;
}

But it doesn't work (background is opaque).

It is possible to set transparency to the applet without loosing drag and drop capabilities ?

I'm searching something similar to flash wmode parameter.

Better solutions implies only changes on the CSS/HTML without recompiling java class so the designing team can change the page structure without changing the Java.

© Stack Overflow or respective owner

Related posts about java

Related posts about transparency