Want more information ?. Try the Web Home Page for this document.

The PSPNum Demonstration

You can extract this HTML page PSPNumDemo2.html from the download file pspnumdemo1.zip. At the bottom of the page is a small Java applet for which the source code is:

<APPLET CODE="uk.co.prosperosoftware.pspnumdemo.PSPNumDemo.class"
CODEBASE="http//www.prosperosoftware.co.uk/software/java/decimals/pspnumdemo/"
WIDTH="800" HEIGHT="400" ALT="PSPNumDemo2 Applet could not be displayed"
ALIGN="BOTTOM">
<PARAM NAME="ARCHIVE" VALUE="pspnum1.jar,pspnumdemo1.jar">
<PARAM NAME="SHOWCUSTOMIZER" VALUE="1">
<PARAM NAME="SHOWOPERNUM" VALUE="1">
<PARAM NAME="SHOWOPERSTRING" VALUE="1">
</APPLET>

The PSPNumDemo Java class exists only to show the functions of the PSPNum Java class. You can edit the HTML source for this page to change parameters for the applet. In this way you control which features of PSPNum you want to see. To suppress the demo of a particular PSPNum feature, change the value="1" to value="0". The options are:

The demo assumes that the two jar files we provide - pspnum1.jar and pspnumdemo1.jar will be downloaded dynamically by the applet from our web site www.prosperosoftware.co.uk where they are located as follows:

www.prosperosoftware.co.uk/software/java/decimals/pspnumdemo/pspnum1.jar
www.prosperosoftware.co.uk/software/java/decimals/pspnumdemo/pspnumdemo1.jar

The above absolute URLs are derived by concatenating the codebase and archive sections of the applet tag. Using absolute URLs means you can run the demo from any directory i.e. this HTML page does not have to have a specific location relative to the two jar files.

Running the PSPNum Demonstration

You can exercise the applet using the Java appletviewer by running the following at a command line:

appletviewer PSPNumDemo2.html

Or if you are running Win95/NT, you can simply run PSPNumDemo2.bat which runs appletviewer for you. In either case, you will not see this text you are reading now. This is quite normal - just a feature of the appletviewer which ignores everything that is not within applet tags.

Or you can load this HTML page in a Web browser - in which case you should definitely see this text (if not, upgrade your browser).

Within the browser, you should see the PSPNumDemo class running immediately under the line below. If you do not see the applet running, it is most likely that your browser simply does not support the relatively advanced features of the demo (jar files, full Java Beans etc.). These features are not implemented at all in older browsers such as Netscape Navigator 3 and Internet Explorer 3. They are implemented satisfactorily in the Sun HotJava browser version 1.1.2 and Netscape Communicator version 4.07 which we use internally to check the applet below. If you do not have a browser which supports Java 1.1 (with or without the Sun's Java Plug-in), your best bet is the appletviewer.