Transparent Window

2019-07-26 15:27发布

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 ...

4条回答
甜甜的少女心
2楼-- · 2019-07-26 16:02

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/

查看更多
劳资没心,怎么记你
3楼-- · 2019-07-26 16:04

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

查看更多
趁早两清
4楼-- · 2019-07-26 16:07
爷、活的狠高调
5楼-- · 2019-07-26 16:08

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.

查看更多
登录 后发表回答