public final class LoginController extends Object implements ActionListener
This implementation is only a toy. It doesn't perform realistic validation of user name and password. For your own applications, you will need to supply your own implementation.
Modifier and Type | Field and Description |
---|---|
(package private) static String |
CANCEL
Action command string.
|
(package private) static String |
LOGIN
Action command string.
|
Constructor and Description |
---|
LoginController() |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent aEvent)
|
void |
askUserForCredentials()
Ask the end user for their user name and password.
|
(package private) void |
validateUserCredentials()
Validate the user name and password entered by the user.
|
static final String LOGIN
static final String CANCEL
public LoginController()
public void actionPerformed(ActionEvent aEvent)
actionPerformed
in interface ActionListener
public void askUserForCredentials()
This is the first screen displayed to the user upon startup.
void validateUserCredentials()
If the validation succeeds, close the login screen and display the MainWindow
.
If the validation fails, allow the user to make a few more attempts at login.
If the validation fails repeatedly, close the application.
Copyright Hirondelle Systems - Generated 2013Sep20.11.16