タイトルに画像を追加する必要があります。Javaコードでそれを行う方法を知っています。しかし、私はcssのみでそれを行いたいです。私は試した:
.titled-pane > .title{
-fx-graphic: url("imgs/general/logo.png");
}
と
.titled-pane {
-fx-graphic: url("imgs/general/logo.png");
}
しかし、それは役に立ちませんでした。
更新: リソース パス。
/src/main/resources/styles.css
/src/main/resources/imgs/general/logo.png
/src/main/resources/fxml/window.fxml