Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Load Exception??

3463663May 11 2017 — edited May 11 2017

Hi all,

I am facing this problem,

Caused by: javafx.fxml.LoadException: Error resolving onAction='#MakeNewProject', either the event handler is not in the Namespace or there is an error in the script.

On button click, I face this problem.  I write the following code,

  @FXML

    private void handleButtonAction(ActionEvent event) throws IOException {

        if(event.getSource()==btnEnglish)

        {

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

       

       Stage addDialogStage=new Stage();

       addDialogStage.setTitle("Home Screen");

       addDialogStage.initModality(Modality.APPLICATION_MODAL);

    

      

       Scene scene=new Scene(root);

       scene.getStylesheets().add("/styles/Style_selectlanguage.css");

       addDialogStage.setScene(scene);

       addDialogStage.showAndWait();

        }

How do we solve this problem?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 8 2017
Added on May 11 2017
1 comment
2,967 views