How do you pause a program until a button is pressed in JAVA?

Java: Close gui and open a new one?

  • Hi I'm trying to make a gui program that has 2 JTextFields which when the create button is pressed, will add the text to a Username array and Password array. Under the 2 JTextFields and create button the re are 2 more JTextFields that test to see if the entered Username and Password are in those arrays and if it is then I want the login gui to close and a welcome gui to open. My problem is I can't find a function that lets me close the current login gui if the login attempt is successful =[ Cheers

  • Answer:

    A quick search led me to this, which I believe will point you in the right direction: http://www.dreamincode.net/code/snippet4460.htm Good luck with your project!

Eun at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.