Hi,
I am making a small application. I want the first frame to be a sort of username / password login. When the user presses ok, and if the username and password are correct, then the next screen will appear (and if username and password are incorrect, an error dialog box appears).
I am using NetBeans. I have created 2 frames, FrameOne and FrameTwo. In the main class, I have constructed the two frames and set them as visible, but the problem is that they pop up simultaneously. I want FrameTwo to appear only after FrameOne is closed.
Any isead on how to do this?
Thanks
ublic class Main { /** * @param args the command line arguments */ public static void main(String[] args) { FrameOne front = new FrameOne(); front.setVisible(true); FrameTwo frametwo = new FrameTwo(); frametwo.setVisible(true); } }