2 Replies Latest reply: Nov 13, 2012 11:20 AM by J. Ishikawa RSS

    Override built-in "exit full screen"method

    J. Ishikawa
      Hi!

      Is it possible to override the built-in "Exit Full Screen"-method provided by JavaFX?

      To be more precise, when the application is in full screen mode and a user presses the ESC-key, I want to do something else than the default implementation.

      I tried the following but somehow, always the default implementation kicks in and my own implementation does not become executed.

      public void handle(KeyEvent ke) {
      if ((ke.getCode() == KeyCode.ESCAPE) && (stage.isFullScreen() == true)) {
      // do something....
      }
      }