im creating a java application with netbeans. i have two jframes for login and the main application. what i want to do is to load the login jframe at runtime, then load the main application jframe when user authentication is correct. the instance of the login jframe must be destroyed after the main application jframe has already loaded. also, i want the user information from the login jframe to be passed to the main application jframe. how do i acheive this?
Share
Extend JFrame to create the Main Frame. Add a constructor in this to accept the user information.
From login screen, when authentication succeeds, create an instance of the Main frame by passing the login information. Invoke dispose() on the login frame and invoke
setVisible(true)on the main frame.