https://stackoverflow.com/questions/4044726/how-to-set-a-timer-in-java



43210



scene.addEventHandler(KeyEvent.KEY_PRESSED, (key) -> {
      if(key.getCode()==KeyCode.ENTER) {
          System.out.println("You pressed enter");
      }
});

https://stackoverflow.com/questions/29179036/using-javafx-8-scene-read-keyboard-input-while-running



	scene.setOnKeyPressed(new EventHandler<KeyEvent>() {
            @Override
            public void handle(KeyEvent event) {
                switch (event.getCode()) {
                    case UP:    goNorth = true; break;
                    case DOWN:  goSouth = true; break;
                    case LEFT:  goWest  = true; break;
                    case RIGHT: goEast  = true; break;
                    case SHIFT: running = true; break;
                }
            }
        });

https://openjfx.io/javadoc/16/javafx.graphics/javafx/scene/input/KeyCode.html




https://jenkov.com/tutorials/java-collections/queue.html

https://www.simplilearn.com/tutorials/java-tutorial/queue-in-java





Exception in thread "Timer-0" java.lang.IllegalStateException: Not on FX application thread; currentThread = Timer-0

https://stackoverflow.com/questions/26916640/javafx-not-on-fx-application-thread-when-using-timer

Platform.runLater(()