Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7884911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:55:35+00:00 2026-06-03T04:55:35+00:00

i am trying to load a fxml from a subfolder, but it fails. I

  • 0

i am trying to load a fxml from a subfolder, but it fails. I have the line that make the replace scene content:

private Parent replaceSceneContent(String fxml) throws Exception {
        Parent page = (Parent) FXMLLoader.load(App.class.getResource("skinFolder/fxml/"+fxml), null, new JavaFXBuilderFactory());
        Scene scene = stage.getScene();
        if (scene == null) {
            scene = new Scene(page, 700, 450);
            scene.getStylesheets().add(App.class.getResource("skinFolder/css/defaultSkin.css").toExternalForm());
            stage.setScene(scene);
        } else {
            stage.getScene().setRoot(page);
        }
        stage.sizeToScene();
        return page;
    }

I use this function in the next method:

private void gotoLogin() {
        try {
            replaceSceneContent("login.fxml");
        } catch (Exception ex) {
            Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

The problem is that i got the next errors:

javafx.fxml.LoadException: Method processLogin() does not have the correct signature for an event handler.
    at javafx.fxml.FXMLLoader$Element.processEventHandlerAttributes(Unknown Source)
    at javafx.fxml.FXMLLoader$ValueElement.processEndElement(Unknown Source)
    at javafx.fxml.FXMLLoader.processEndElement(Unknown Source)
    at javafx.fxml.FXMLLoader.load(Unknown Source)
    at javafx.fxml.FXMLLoader.load(Unknown Source)
    at Main.App.replaceSceneContent(App.java:115)
    at Main.App.gotoLogin(App.java:108)
    at Main.App.start(App.java:72)
    at com.sun.javafx.application.LauncherImpl$5.run(Unknown Source)
    at com.sun.javafx.application.PlatformImpl$4.run(Unknown Source)
    at com.sun.javafx.application.PlatformImpl$3.run(Unknown Source)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.access$100(Unknown Source)
    at com.sun.glass.ui.win.WinApplication$2$1.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:722)

Anyone has any ideea what i need to fix so i can make this replace scene content to work?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:55:37+00:00Added an answer on June 3, 2026 at 4:55 am

    If you are defining an action of Button in FXML file like this:

     <Button text="Login" onAction="#processLogin"/>
    

    then you must define a method in the controller class like as following. Note the signature of processLogin:

        @FXML
        private void processLogin(javafx.event.ActionEvent event) {
            // Process Login
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am trying load file after it created from /stext command line but its
I trying to load feeds from my blog but this is resulting in the
I'm trying to load File.ServerRelativeUrl when loading items from list, but no luck. Trying
I am trying to load a string from Core Data and if that value
I'm trying to load an m3u8 file that's saved to the local filesystem, but
I am trying load a ruby script that uses nokogiri, but get a LoadError
i m trying load UIImages from server asynchronously in UITableViewCell. My code worked fine
I have a problem with out of memory when I'm trying load a few
trying to load in a bunch of images into a list from a directory...my
When trying to load Microsoft.Xna.Framework.dll from any project, it throws a FileNotFoundException. The specified

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.