A javafx stage with a transparent background and decorations

你。 提交于 2019-12-25 05:55:08

问题


I'd like to create a simple protactor in javafx. To that aim, I need to create a stage with a transparent backgrount but WITH decorations. I mean : I still want to be able to move my window or close it when finished. I tried to use those properties :

stage.initStyle(StageStyle.TRANSPARENT);

But all the window disappear : the background AND the decoration. I also tried to use :

stage.setOpacity(0.9);

In that case, all the window, background and decoration is partially translucent and that's not what I want to get. I would like a stage with a full opaque decoration and a fully transparent background on which I'll can draw a protractor partially opaque, like if I was using the real object on my screen.

Does someone could give me a tip to do that ?

Thank you for your help.

来源:https://stackoverflow.com/questions/42313505/a-javafx-stage-with-a-transparent-background-and-decorations

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!