Java Reference
In-Depth Information
It is interesting to see how the progress dialog is managed using a Swing Timer object, created
as an anonymous class at line 48 in Listing 7.3. Such a timer is activated every second, and it
refreshes the progress bar value (line 55 in Listing 7.3) according to the installation's current
state. The progress dialog queries the
CDLauncher
to obtain the current installation progress
state. Note that the timer is started automatically at the end of the dialog creation (line 66).
Another important file is the
install.properties
properties file that instructs the
CDLauncher
class how to customize the current application. An example of such a file is reported in Listing
7.4.
L
ISTING
7.4
The
install.properties
Text File
#------------------------------------------#
#
# installation properties file
#
#------------------------------------------#
#
# the application title
#
application-name=MegAppz
#
# the application icon
#
application-icon=appicon.gif
#
# the application large icon
#
application-large-icon=applarge.gif
#
# the application description
#
application-desc=It\ is\ a\ powerful\ utility\ that\
➥
provides\ full\ support\ for\ your\ work\ with\
➥
a\ simple\ and\ easy\ to\ use\ user\ interface.
#
# the application minimal installation set of files
#
application-minimal-set=a.jar