background image

The Classes and Their Relationships

<< Application Client | Class Methods >>
<< Application Client | Class Methods >>

The Classes and Their Relationships

Remove a customer
Find a customer's ID
Account administration:
Create a new account
Add a new customer to an existing account
Remove a customer from an existing account
View account information
Remove an account from the database
Error and informational messages appear in the bottom under Messages.
The Classes and Their Relationships
The source code for the application client is in the following directory:
tut-install/javaeetutorial5/examples/dukesbank/dukesbank-appclient/src/java/com/sun/tutorial/
javaee/dukesbank/client/
The application client is consists of a single class: BankAdmin.
BankAdmin
Class
The BankAdmin class, which creates the user interface, is a Swing class that provides action
methods that are called when certain events occur in the application, and methods that call the
controller session beans. It was created using the NetBeans IDE Swing editor, Matisse.
Note ­
Although BankAdmin was written using NetBeans IDE, you do not need to have NetBeans
installed in order to run the application. If you want to alter the user interface, however, you do
need to use NetBeans IDE.
The BankAdmin Constructor
The BankAdmin constructor creates the initial user interface, which consists of a menu bar, two
tabs, and a message pane, by calling the initComponents method. The menu bar contains the
standard File and Edit menus, the left tab is for viewing and updating customer information, the
right tab is for viewing and updating account information, and the message pane contains a
message area.
The initComponents method is automatically generated by NetBeans IDE. It creates all the user
interface elements visible in BankAdmin.
Application Client
Chapter 37 · The Duke's Bank Application
1065