简体   繁体   中英

JavaFX full-screen window: remove popup text

I'm using

window.setFullScreen(true);  

To make the window full screen.

But ever single time I change scene / pane on the window and make it full screen again it pops us with...

Press ESC to exit full-screen mode.

Im guessing this is a built in NetBeans function as it does this on every machine I work on. Is there any way I can stop this / turn it off or is there another method for full screen that doesn't pop anything annoying.

The "Press ESC to exit full-screen mode ..." text is coming from the Stage , closer from the fullScreenExitHintProperty of the Stage .

Parts of the doc (copied from getFullScreenExitHint , emphasis mine):

Specifies the text to show when a user enters full screen mode, usually used to indicate the way a user should go about exiting out of full screen mode. A value of null will result in the default per-locale message being displayed. If set to the empty string, then no message will be displayed.

If an application does not have the proper permissions, this setting will be ignored.

So, if you don't want to see any text, set this property to an empty string:

primaryStage.setFullScreenExitHint("");
primaryStage.setFullScreen(true);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM