I am using swing to build an application, and want to have a login screen.
I basically have 2 panel classes, one being the main page of the application, and the other being the login screen panel.
My question is, how do I (in java) do a "hold", type of action.
In other words, In my main program, before I do an initComponents, I do a loginscreen.setVisible(true), which displays the login to the user, and then based on whether or not they put in the correct login. I am going to set a boolean up to be true or false, which I guess will be interpreted by my main applcationView class.
But how would I create a "pause" after I set the screen visible to wait on the user to hit the "submit" button, at which point I want to check the login, and then run the rest of the program.
I saw something about wait and notify, but was unsure of how to use them, or if this was the right approach.
Thanks

