more lambda code

This commit is contained in:
Jannik 2019-06-15 11:11:18 +02:00
parent 2689b03c16
commit 0fecb8bb16
Signed by: Seil0
GPG Key ID: E8459F3723C52C24
1 changed files with 1 additions and 7 deletions

View File

@ -26,7 +26,6 @@ import com.jfoenix.controls.JFXButton;
import com.jfoenix.controls.JFXDialogLayout;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.text.Text;
import javafx.stage.Stage;
@ -59,12 +58,7 @@ public class JFXInfoAlert {
JFXAlert<Void> alert = new JFXAlert<>(stage);
JFXButton button = new JFXButton("Okay");
button.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
alert.close();
}
});
button.addEventHandler(ActionEvent.ACTION, (e)-> alert.close());
button.setButtonType(com.jfoenix.controls.JFXButton.ButtonType.RAISED);
button.setPrefHeight(32);
button.setStyle(btnStyle);