how to run frame one after the other

Posted by user1758401 on Stack Overflow See other posts from Stack Overflow or by user1758401
Published on 2012-10-27T10:48:08Z Indexed on 2012/10/27 11:00 UTC
Read the original article Hit count: 139

Filed under:
|

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);
    }
        }
    });

© Stack Overflow or respective owner

Related posts about java

Related posts about swing