2 Replies - 653 Views - Last Post: 23 August 2011 - 05:58 PM Rate Topic: -----

#1 dukky  Icon User is offline

  • D.I.C Head

Reputation: 8
  • View blog
  • Posts: 111
  • Joined: 28-November 09

make program wait for login.

Posted 22 August 2011 - 10:37 PM

I have a main class with many supporting classes, one of them is a GUI that serves as a login screen. My main class runs and creates this GUI. My main class has to ask the login class for login information, but it will have to wait for the user to click "LOGIN". when the program asks for the login information, how do I make it wait for the user to click LOGIN?
Is This A Good Question/Topic? 0
  • +

Replies To: make program wait for login.

#2 CasiOo  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1571
  • View blog
  • Posts: 3,529
  • Joined: 05-April 11

Re: make program wait for login.

Posted 22 August 2011 - 10:42 PM

You might find pbl's snippet useful Here
Was This Post Helpful? 0
  • +
  • -

#3 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8378
  • View blog
  • Posts: 31,956
  • Joined: 06-March 08

Re: make program wait for login.

Posted 23 August 2011 - 05:58 PM

View Postdukky, on 23 August 2011 - 01:37 AM, said:

I have a main class with many supporting classes, one of them is a GUI that serves as a login screen. My main class runs and creates this GUI. My main class has to ask the login class for login information, but it will have to wait for the user to click "LOGIN". when the program asks for the login information, how do I make it wait for the user to click LOGIN?

You miss a concept here
When you GUI is launched, it is launched... the flow returns to main() that finishes
Then all the rest should happen in your GUI most probably in an actionPerformed() method when your "LOGIN" button is clicked.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1