how to locate fxml from another package?

后端 未结 3 484
傲寒
傲寒 2020-12-31 12:43

I have created a simple JavaFX application.

\"enter

It has two pa

3条回答
  •  情话喂你
    2020-12-31 12:52

    Try

    Parent root = FXMLLoader.load(getClass().getResource("/jfxtest2/Screen.fxml"));
    

提交回复
热议问题