So I have this line of code which shows a Dialog:
public void showInfoDialog(String header,String message) {
JFXDialogLayout content = new JFXDialogLayout();
content.setHeading(new Text(header));
content.setBody(new Text(message));
JFXDialog dialog = new JFXDialog(mySP,content, JFXDialog.DialogTransition.CENTER);
dialog.setMinHeight(mySP.getPrefHeight());
dialog.setMinWidth(mySP.getPrefWidth());
JFXButton button = new JFXButton("OK");
button.setOnAction((ActionEvent event) -> {
dialog.close();
});
content.setActions(button);
dialog.show();
}
And that is leading to this output:
How can I adjust the height and width of the dialog so I can't see the grey background of my stackpane