如何設置對話框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
提交
取消