Hey.
I am a true java beginner. I am trying to write an app that requires a login before you enter the main portion of the app. As of right now, I have a "main" in the main class that creates a form object, which handles connection to the database and verification of the user's id.
However, the "main" keeps executing without waiting for the login to return.
Code samples:
-----------8<----------------
public static void main(String arg[]) {
System.out.println("Application Starting"
new APP();
// Connect to the database by providing a username and password
login newLogin = new login();
System.out.println("Returned to main"
}
------------>8---------------
The problem is that this doesn't wait for newLogin to finish before it prints "Returned to main". How can I achieve this behavior?
Thanks all! Brad Gunsalus
Cymtec Systems, Inc.
bgunsalus@cymtec.com
I am a true java beginner. I am trying to write an app that requires a login before you enter the main portion of the app. As of right now, I have a "main" in the main class that creates a form object, which handles connection to the database and verification of the user's id.
However, the "main" keeps executing without waiting for the login to return.
Code samples:
-----------8<----------------
public static void main(String arg[]) {
System.out.println("Application Starting"
new APP();
// Connect to the database by providing a username and password
login newLogin = new login();
System.out.println("Returned to main"
}
------------>8---------------
The problem is that this doesn't wait for newLogin to finish before it prints "Returned to main". How can I achieve this behavior?
Thanks all! Brad Gunsalus
Cymtec Systems, Inc.
bgunsalus@cymtec.com