Call setOpaque(false); on your window. Then, when you repaint it, do
something like:
public void paintComponent(Graphics g)
{
Composite oldComposite = g.setComposite(AlphaComposite.Clear);
g.fill(getBounds());
g.setComposite(oldComposite);
//Rendering code
}
Mark McKay
Rob Ross wrote:
I'm in the middle of a project where being able to make a window's
background
translucent/semi-transparent would be a very very cool thing
to have.
Is this possible yet with 1.4? If not, how about 1.5?
Is this feature really that hard to implement?
I'm asking honestly, I don't know what's required in the JVM to make
this happen. But since both OS X and WindowsXP seem to do this all the
time now, I have to assume most of the "hard" code already has been
written in those platform's native libraries.
Rob Ross
Senior Software Engineer
E! Networks
[EMAIL PROTECTED]
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
of the message "signoff JAVA2D-INTEREST". For general help, send
email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".