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());
Published by
on
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.
Hello,

Welcome to Skills421, our knowledge repository for all things tech in the 21st century
Leave a reply to Ged Byrne Cancel reply