package fr.univ.lyon1.gui.controller; import javafx.scene.control.Alert; import org.jetbrains.annotations.NotNull; public class Dialog { public static void showErrorDialog(String title, String description) { @NotNull final Alert alert = new Alert(Alert.AlertType.WARNING); extracted(title, description, alert); } public static void showSuccessDialog(String title, String description) { System.out.println("Create success dialog..."); @NotNull final Alert alert = new Alert(Alert.AlertType.INFORMATION); System.out.println("Extracting..."); extracted(title, description, alert); } private static void extracted(String title, String description, @NotNull Alert alert) { System.out.println("Set title"); alert.setTitle(title); System.out.println("Set description"); alert.setContentText(description); System.out.println("Show"); alert.show(); } }