how to make components visible in a transparent JFrame

Posted by Md. Mahmudul Hasan on Stack Overflow See other posts from Stack Overflow or by Md. Mahmudul Hasan
Published on 2013-10-22T09:51:13Z Indexed on 2013/10/22 9:53 UTC
Read the original article Hit count: 204

Filed under:

I have some JButtons in a JFrame (its layout is null). The background Color of the buttons are set Black. I have made the JFrame Transparent by using this code.

AWTUtilities.setWindowOpacity(this, 0);

But the problem is it also makes all the buttons transparent as well. I don't want that. I want to see the buttons remaining black but the other portions of the JFrame becoming transparent (so that I can see the desktop background). Please someone help me. Thanks in advance.

© Stack Overflow or respective owner

Related posts about java