how to make components visible in a transparent JFrame
- by Md. Mahmudul Hasan
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.