Michael Berry
Michael Berry

Reputation: 72379

Translucent background on JWindow in Java (without using screenshots)

I've seen other answers and hacks around to this question, but none seem to do exactly what I'm after.

Essentially, I'm after a JWindow whose background is translucent but the content of the window itself (buttons, text and so on) are opaque. The methods I've seen so far fall into one of two categories:

Is what I'm asking for possible, and if so how would it be done? If not, will Java 7 provide any methods that would make this easier / possible? I know it's got more support built in for shaped windows so I wonder whether something there could take care of this also. I've been searching around for a while now but with no luck.

Upvotes: 3

Views: 2218

Answers (1)

Chuk Lee
Chuk Lee

Reputation: 3608

Can only be done if you are using JDK 6 update 10 and above. Must also support hardware acceleration. See

http://download.oracle.com/javase/tutorial/uiswing/misc/trans_shaped_windows.html

Upvotes: 8

Related Questions