19 lines
561 B
Java
19 lines
561 B
Java
package logiledus;
|
|
|
|
import javafx.scene.control.Alert;
|
|
import javafx.scene.layout.Region;
|
|
|
|
public class ServiceWindow {
|
|
/**
|
|
* Create window with notification
|
|
* */
|
|
public static void getErrorNotification(String title, String body){
|
|
Alert alertBox = new Alert(Alert.AlertType.ERROR);
|
|
alertBox.setTitle(title);
|
|
alertBox.setHeaderText(null);
|
|
alertBox.setContentText(body);
|
|
alertBox.getDialogPane().setMinHeight(Region.USE_PREF_SIZE); // Java bug workaround for linux
|
|
alertBox.show();
|
|
}
|
|
}
|