10.12.2012 Views

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Customer Info tab:<br />

■ View customer information<br />

■ Add a new customer to the database<br />

■ Update customer information<br />

■ Remove a customer<br />

■ Find a customer’s ID<br />

Account administration:<br />

■ Create a new account<br />

■ Add a new customer to an existing account<br />

■ Remove a customer from an existing account<br />

■ View account information<br />

■ Remove an account from the database<br />

Error and informational messages appear in the bottom under Messages.<br />

<strong>The</strong> Classes and<strong>The</strong>ir Relationships<br />

<strong>The</strong> source code for the application client is in the following directory:<br />

tut-install/javaeetutorial5/examples/dukesbank/dukesbank-appclient/src/java/com/sun/tutorial/javaee/dukesbank/client<br />

<strong>The</strong> application client is consists of a single class: BankAdmin.<br />

BankAdmin Class<br />

<strong>The</strong> BankAdmin class, which creates the user interface, is a Swing class that provides action<br />

methods that are called when certain events occur in the application, and methods that call the<br />

controller session beans. It was created using the NetBeans IDE Swing editor, Matisse.<br />

Note – Although BankAdmin was written using NetBeans IDE, you do not need to have NetBeans<br />

installed in order to run the application. If you want to alter the user interface, however, you do<br />

need to use NetBeans IDE.<br />

<strong>The</strong> BankAdmin Constructor<br />

Application Client<br />

<strong>The</strong> BankAdmin constructor creates the initial user interface, which consists of a menu bar, two<br />

tabs, and a message pane, by calling the initComponents method. <strong>The</strong> menu bar contains the<br />

standard File and Edit menus, the left tab is for viewing and updating customer information, the<br />

right tab is for viewing and updating account information, and the message pane contains a<br />

message area.<br />

Chapter 37 • <strong>The</strong> Duke’s Bank Application 1057

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!