I am write a javafx 2 application that have a login window and a main window that users see when they are logged in. I want the main window to me shown when the user is login is authenticated. I tried creating a new class that create a new javafx stage but that doesn't work. How can I achieve this and with the best practice.