tags:

views:

349

answers:

2

I have a little JWindow with a logo on it that users can drag stuff to. I develop my application mainly on OS X. To get a transparent window i use

setBackground(new Color(0,0,0,0));

On a mac this works beautifully but i can't get the same effect on windows. Is there any way to get a transparent window without using 1.6 specific features.

i need 1.5 compatibility.

+1  A: 

Sadly, windows (previous to Vista at least) doesn't do this kind of compositing. There is however a workaround. Example code can be found at http://rabbit-hole.blogspot.com/2007/02/non-rectangular-windows-update.html

Markus Koivisto
A: 

As of 1.5 Java does not support transparent windows. This feature is introduced as part of 1.6.10 release. See AWTUtilities class for more details.