如何设置对话框contentText所在的 JavaFX 警报高度null?我发出警报并设置contentText为空,但对话框的contentText字段高度并没有变小。我怎样才能使contentText字段的高度最小?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我只是这样尝试。alert.getDialogPane().setMaxHeight(10); //does not work.
添加回答
举报
0/150
提交
取消