If I just create an empty class extending from javafx.scene.control.Dialog, it won\'t close when I\'m pressing the \"x\" button in the top right corner
I have faced this situation with alerts with the below code.
Alert alert = new Alert(Alert.AlertType.NONE);
alert.setTitle("Export Successful");
alert.setContentText("All the posts have been exported to Posts.txt file
successfully");
alert.show();
The only workaround would be to create an alert or dialog with a button in it like below.
Alert alert = new Alert(Alert.AlertType.INFORMATION);
alert.setTitle("Export Successful");
alert.setContentText("All the posts have been exported to Posts.txt file
successfully");
alert.showAndWait();