JavaFX CSS Error ( Property Stylesheets does not exist )

后端 未结 4 1914
故里飘歌
故里飘歌 2021-01-04 23:23

I have just began building a JavaFX application in IntelliJ using the latest Java7 SDK.

I have built my interface using Oracle Scene Builder, everything runs and dis

4条回答
  •  死守一世寂寞
    2021-01-04 23:51

    You were creating an FXML in Scene Builder 2 and running in JDK 7. SB 2 "tries to" create Java 8 compatible FXML code. To fix the FXML:

    1. Remove the stylesheets="@MainView.css" attribute
    2. Add in the imports
    3. Add the below code at the end of parent pane, after (in my case it was before ):

      
        
      
      

提交回复
热议问题