How can I set JavaFX alert height in which dialog's contentText
is null
? I made an alert and set contentText
as null, but dialog's contentText
field's height does not became smaller. How can I make contentText
field's height as minimum?
Alert alert = new Alert(AlertType.CONFIRMATION);
alert.setTitle("title");
alert.setHeaderText("I want to make dialog without contenttext");
alert.setContentText(null); //this is null but this field is still remain
I just tried like this.
alert.getDialogPane().setMaxHeight(10); //does not work.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.