Transparent Window

2019-07-26 15:24发布

问题:

I have a fullscreen JFrame. I added a map to JPanel then added it to JFrame. Now I want to add a transparent window to JFrame. I want to see all map and I want to move transparent window.

I did it with internal frame but I couldn't it's title tranparent.

Could you help me about this?

Thanks ...

回答1:

One possible way is to add a JPanel to the glasspane.



回答2:

Does com.sun.awt.AWTUtilities.setWi­ndowOpacity(this, 0.3f); work? (although it's not an officially supported API, natch). Regardless, there's an article on this here.



回答3:

http://techgearup.wordpress.com/2008/09/19/transparent-jframe-background/

This might help... as a starting point, at least.



回答4:

If you´r having truble finding it on google it could be because you'll have to google "Translucent"

http://java.sun.com/developer/technicalArticles/GUI/translucent_shaped_windows/