Java Reference
In-Depth Information
shorter development time, with fewer costs (the deployment circuit is set up only once for all
the applications) and a higher software quality. Figure 7.8 shows a screenshot of its execution.
In Listing 7.8, the code is supplied without the GUI building details in the
initApplication
method.
7
F
IGURE
7.8
The accounting applet at work.
Essentially, we created a utility
Applet
subclass,
ClientDeploylet
(see Line 14 in Listing 7.8)
that provides deployment services to our client applets. Such services are provided by means of
some inherited methods. In this example scenario, we provided a logging and debugging ser-
vice, called using the
log
methods (line 31 or 45 in Listing 7.8). But the most interesting
aspect of this deployment framework is its client application lifecycle coverage, as we will see
later.
L
ISTING
7.8
The
AccountApplet
Class
package com.marinilli.b2.c7.deploylet;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import javax.swing.*;
import javax.swing.border.*;
/**
* Chapter 7 -The example account applet
*