how to run frame one after the other
- by user1758401
I am developing an application where the valid user gets access to the main application. But a problem arises when I run main class. The LoginFrame and Main(Editor.java) Frame start simultaneously.
I want to first validate the user and then direct the user to the main application. I am calling Loginform.java from my main application (i.e Editor.java)
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Login().setVisible(true);
{
Editor x = new Editor();
x.setVisible(true);
}
}
});