问题出在源头
因此,您必须将其更改为适当的
这样做,在这里编辑fxml文件的源代码
AnchorPane root = (AnchorPane) FXMLLoader.load(Main.class.getResource("LoginGUI.fxml"));与这个
AnchorPane root = (AnchorPane) FXMLLoader.load(Main.class.getResource("/packagename/LoginGUI.fxml"));
问题出在源头
因此,您必须将其更改为适当的
这样做,在这里编辑fxml文件的源代码
AnchorPane root = (AnchorPane) FXMLLoader.load(Main.class.getResource("LoginGUI.fxml"));与这个
AnchorPane root = (AnchorPane) FXMLLoader.load(Main.class.getResource("/packagename/LoginGUI.fxml"));