title: Issue with Keypressed event in JavaFx in Java 8
body: <p>I recently updated my java 7 to java 8. I have an application that takes in the keypressed event and check whether the keypressed is a navigational key and act accordingly. 
  Below is a <a href="https://stackoverflow.com/help/mcve">mcve</a></p>
  
  <p>My controller code: </p>
  
  <pre><code>package sample;
  
  import javafx.fxml.FXML;
  import javafx.scene.input.KeyEvent;
  
  public class Controller {
  
      @FXML
      private void keyPressed(KeyEvent evt) {
          System.out.println("Key Pressed");
      }
  
  
  }
  </code></pre>
  
  <p>My FXML file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  //I removed all the imports in this post... My original fxml has all the imports...  
  
  &lt;GridPane id="gridPaneId" alignment="CENTER" focusTraversable="true" 
  gridLinesVisible="true" hgap="10.0" onKeyPressed="#keyPressed" prefHeight="400.0"
   prefWidth="300.0" vgap="10.0" xmlns:fx="http://javafx.com/fxml/1"  
  xmlns="http://javafx.com/javafx/2.2" fx:controller="sample.Controller" /&gt;
  </code></pre>
  
  <p>The issue is that my code completely works fine if I run it using Java 7. When I try to run it using java 8, my UI shows up without any issues but the program is not recognizing the keypressed event. What could be the reason.</p>