How to style JavaFX 2 Fullscreen message?

僤鯓⒐⒋嵵緔 提交于 2019-12-22 03:39:23

问题


Going to Fullscreen mode in JavaFX causes a giant message telling the user that he can leave this mode pressing ESC. Not only this takes the "desktopish" feeling off my application, it also looks ugly.

I guess this message is not ment to be suppressed, so my hope is that i can at least brand it. So, how can i style it?


回答1:


There is a requests to Allow trusted apps to disable the fullscreen overlay warning and disable the "Exit on ESC" behavior and Touch Screen only - Press ESC to exit full-screen mode. does not apply. Neither request has been implemented as of JavaFX 2.2.

There are no requests to allow the message to be styled that I could find. You could create one under the JavaFX Runtime project, but I think it would be rejected due to potential security concerns.




回答2:


JavaFX 8 has a way to suppress this message:

stage.setFullScreenExitKeyCombination(KeyCombination.NO_MATCH);



回答3:


You can just completely disable the message with:

primaryStage.setFullScreenExitHint("");


来源:https://stackoverflow.com/questions/12569206/how-to-style-javafx-2-fullscreen-message

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