Search code examples
javafx-2javafx

How to change scene when in fullscreen in JavaFX and avoid "Press ESC to exit fullscreen" message


How is it possible to change scene of fullscreen window and avoid to show "Press ESC to exit fullscreen" message?

I'm building fullscreen desktop application (touchscreen kiosk) so I can show this message at the beginning, but now always when user changes scene.

There are two problems:

  1. When in fullscreen and scene is changed, window size is reduced. Solution is to toggle fullscreen, but there is that message shown. (Change scene in full screen JavaFX)

  2. "Press ESC.." message cannot be disable due to security reasons (https://forums.oracle.com/forums/thread.jspa?threadID=2287258)

Thanks.


Solution

  • JavaFX 8 has solved this problem with the addition of the following 2 methods:

    If you set the exit key combination to KeyCombination.NO_MATCH the pop-up message will be disabled completely.