【发布时间】:2023-04-01 02:24:02
【问题描述】:
我在 Scene Builder 2.0 中做了一个很酷的设计,并且还使用了 css 属性。 在 Scene Builder 中一切看起来都很棒,但是当我通过以下方式加载应用程序时:
@Override
public void start(Stage stage) throws Exception {
Parent root = FXMLLoader.load(getClass().getResource("BasicApplication_css.fxml"));
Scene mainScene = new Scene(root,900,600);
stage.setTitle("VuBPS");
stage.setScene(mainScene);
stage.show();
}
以下属性不起作用:
#mainFrame .title{
-fx-min-height: 40px;
-fx-pref-height: 40px;
-fx-padding: 0px 0px 10px 20px;
}
所以 TitledPane 不高于标准的,并且填充也不正确......为什么?
【问题讨论】:
-
请同时发布 fxml。
标签: javafx stylesheet scenebuilder