Öncelikle fxml dosyalarını resources ın altına taşıyıp aşağıdakileri yapıp dener misin?

Ayrıca Hello butonuna bir id ver.

<Button fx:id="helloButton" onAction="#clickHello" text="Hello!" />

sonra bu id yi HelloApplication .java da tanımla.

@FXML
private Button helloButton ;


ve aşağıdaki kodu dene.


public void clickHello(ActionEvent e) throws IOException {
Parent root = FXMLLoader.load(getClass().getResource("/deneme.fxml"));

Stage window = (Stage) helloButton .getScene().getWindow();
window.setScene(new Scene(root,320,240));

}