2015-08-19 77 views

回答

1

按照this answer,並添加

.dialog-pane:header .header-panel .label { 
    -fx-font-size: 1.167em; /* 14px */ 
    -fx-wrap-text: true; 
    -fx-text-fill: white; 
} 

CSS文件。

...以及如何單獨確定OK按鈕設計?

一種方法可以查找確定按鈕然後應用自定義CSS樣式

Button button = (Button) alert.getDialogPane().lookupButton(ButtonType.OK); 
button.getStyleClass().add("my-ok-button"); 
+0

如何單獨定製的OK鍵設計? –

+0

非常感謝,它工作正常 –

相關問題