When my application first starts up, it checks to see if a user has already been created. If so, it just starts the application; if not, it shows a "Create New User" dialog, then shows the application. (The main application is in a class called Console which inherits from JFrame.)
My dilemma is that I'm not sure how to properly listen to when the CreateNewUserWizard closes so that I can open the main Console.
CreateNewUserWizard's default close operation is to "do nothing", as I pop up a confirmation box asking if they're sure before closing.
I'm trying to figure out where to place responsibility. Should the Console class be in charge of figuring out if a user exists, and displaying the dialog if not? Should the class with the main() method decide this? And if so, how can it tell when the dialog has finished, and retrieve the results?
Any and all suggestions would be greatly appreciated.
Liam Morley
lmorley@wpi.edu
"light the deep, and bring silence to the world.
light the world, and bring depth to the silence."
My dilemma is that I'm not sure how to properly listen to when the CreateNewUserWizard closes so that I can open the main Console.
CreateNewUserWizard's default close operation is to "do nothing", as I pop up a confirmation box asking if they're sure before closing.
I'm trying to figure out where to place responsibility. Should the Console class be in charge of figuring out if a user exists, and displaying the dialog if not? Should the class with the main() method decide this? And if so, how can it tell when the dialog has finished, and retrieve the results?
Any and all suggestions would be greatly appreciated.
Liam Morley
lmorley@wpi.edu
"light the deep, and bring silence to the world.
light the world, and bring depth to the silence."