JavaFX FXML - Can't change anything from @override handle method (keyboard events)

A have made a calculator in JavaFX FXML, everything works fine, but i'd like to handle key events for typing the numbers on my TextField not only from Buttons. I have created the @Override handle method and whenever i press a key it works fine with System.out ..., but i get an exception when i try to change the value of TextField...what could be the problem?

P.S. i can access and change the TextField from any other method (like setDisplay) besides @Override handle... and i can't even call the setDisplay method from @Override handle

// Handling key events ------------------------------------------------------------------------------------------------

@Override
public void handle(KeyEvent keyEvent) {

    System.out.println(keyEvent.getCode().toString()); // This works
    display.setText("it works from handle"); // This don't

}

public void setHandle() {

    Main.getScene().setOnKeyPressed(this);

}

public void setDisplay(){ // This method works when i call it from anywhere besides the @Override handle method

    display.setText("it works from setDisplay");
}