JavaFX open a new scene
问题 I want my code to work such that when I click on a Button, a new scene opens, but it doesn't work and I don't know why. public void start(Stage primaryStage) throws Exception { window = primaryStage; Parent root = FXMLLoader.load(getClass().getResource("FXML/LoginScene.fxml")); scene = new Scene(root,400,400); openScene = new OpenScene(writer); window.setScene(scene); window.show(); } public static void main(String[] args){ launch(args); } @FXML protected void btnConnect(ActionEvent event) {