title: Changing Scene when a button is pressed Fxml
body: <p>I have 2 fxml files mainFxml.fxml and second.fxml. Main fxml has a button with fx:id="change". I want change scene when change button is clicked.
  Code of mainFxml controller</p>
  
  <pre><code>public void onChangeButtonAction(event e){
    Node node=(Node) event.getSource();
    Stage stage=(Stage) node.getScene().getWindow();
    Parent root = FXMLLoader.load(getClass().getResource("second.fxml"));/* Exception */
    Scene scene = new Scene(root);
    stage.setScene(scene);
    stage.show();
  
  
  }
  </code></pre>
  
  <p>but when i press button change it throws exception as no resource specified. Help me..</p>
  
  <p>Stack trace</p>
  
  <pre><code>No resources specified.
  file:/E:/Projects/javaFx/demo/dist/demo.jar!/demo/sucess.fxml:14
    at javafx.fxml.FXMLLoader$Element.processPropertyAttribute(FXMLLoader.java:305)
    at javafx.fxml.FXMLLoader$Element.processInstancePropertyAttributes(FXMLLoader.java:197)
    at javafx.fxml.FXMLLoader$ValueElement.processEndElement(FXMLLoader.java:588)
    at javafx.fxml.FXMLLoader.processEndElement(FXMLLoader.java:2430)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2136)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2028)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2742)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2721)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2707)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2694)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2683)
    at demo.myFirstFxmlController.onSuccess(myFirstFxmlController.java:130)
    at demo.myFirstFxmlController.OnSubmitAction(myFirstFxmlController.java:53)
  </code></pre>