adding css file to stylesheets in javafx

前端 未结 18 1345
[愿得一人]
[愿得一人] 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 06:01

    in your file .java use this

    Application.setUserAgentStylesheet(getClass().getResource("application.css")
                    .toExternalForm());
    

提交回复
热议问题