An Exit Menu using EventHandler
exitMenuItem.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent t) { Platform.exit(); } });
The same using Lambda Expressions
exitMenuItem.setOnAction(ae -> Platform.exit());
exitMenuItem.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent t) { Platform.exit(); } });
exitMenuItem.setOnAction(ae -> Platform.exit());
Nice, these new Lambdas are going to save so much typing.