Java Reference
In-Depth Information
obtain input before the user can continue working with the application. In either
case, the programmer needs the ability to use multiple windows in the application.
In the stock list application developed in this chapter, the process of identify-
ing whether a user's logon information is valid is distinct from the action of
tracking specific stocks; the stock list application, thus, presents these actions to
the user in two separate windows. As shown in Figure 10-1, after the user logs on
to the application (Figure 10-1a), the logon window will close, and a window for
building a list of stocks opens (Figure 10-1b). When this stock window closes
after the user closes it or logs out, the application reopens the original logon win-
dow. Because this test application does not retain user information between execu-
tions, the logon window also is used to add new users (Figure 10-1c) or to allow a
user to change his or her password to a new password (Figures 10-1d and 10-1e).
If a PasswordException is thrown, indicating that the current password is expir-
ing, an informational message displays prior to displaying the stock list window
(Figure 10-1f). If a PasswordException is thrown, indicating that the current
password has expired or that an invalid password was entered, an appropriate
error message displays to the user (Figures 10-1g through 10-1k on the next page).
f) Password is expiring
b) Add Stock
Symbols window
a) Log on or Maintain
User window
c) New user added
d) New password
e) Password changed
(continued)
FIGURE 10-1
Search WWH ::




Custom Search