Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created a class called App that extends Application (JavaFX). In it, I have 2 stages that are displaying a few buttons. This App class is instantiated in main then passed as an argument to another class/thread called Controller (a has-a relationship). Once Controller receives an event, it calls app.hideGUI(); the contents of the function are:

Java
public void hideGUI()
{
    handstage.hide();
    stage.hide();
}

Also, in the App class I have the following:

Java
public static void main(String[] args) {
    App app = new App();

    //
    launch(args);
}
public App()
{
    StartLeap();

}

public void StartLeap()
{
    LeapApp.init(true);
    LeapApp.setMode(Mode.INTERACTION_BOX);
}


However, this does not work. It either crashes or simply does not hide the stages. Please advice me on why and how to fix this.

Thank you
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900