Javafx error exception in Application start method no controller specified

前端 未结 3 951
一个人的身影
一个人的身影 2020-11-29 12:41

When I run the following code in intellij with java 8 I get an error. Please Help. The fxml is generated using the scene builder, I think the button Dagrooster isn\'t linked

3条回答
  •  北海茫月
    2020-11-29 12:45

    The error says it, the FXML is missing the fx:controller declaration. Add the controller declaration to BorderPane declaration as shown :

    ...
    
    ...
    

    To know how to set controller class via SceneBuilder, you can have a look at this question.

提交回复
热议问题