adding css file to stylesheets in javafx

前端 未结 18 1353
[愿得一人]
[愿得一人] 2020-12-06 05:27

Language: JavaFX

IDE: Netbeans

Problem: I\'m trying to add a css file to the stylesheet, but the first line of the following code always generates a Nu

18条回答
  •  囚心锁ツ
    2020-12-06 05:57

    You can add your style.css directly in your .fxml file as an attribute to your root element as this stylesheets="@your_relative_path/style.css".

    You can use @../style.css if you want to access the css file that is in your src folder

提交回复
热议问题