This is the HTML:
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<TITLE>
Applet Test Page
</TITLE>
</HEAD>
<BODY>
<h2 align="center"><span style="font-weight: 400"> <font face="Courier New" size="2">App.html</font></span></h2>
<h2 align="center"><b>Applet Test Page</b></h2>
<p align="center">This page launches a 300 x 200 pixel
applet named: <font face="Courier New" size="2">App.class</font></p>
<p align="center">
<APPLET CODE=App WIDTH=300 HEIGHT=200>
<PARAM NAME=number VALUE=9>
<PARAM NAME=Date VALUE="5/4/2007">
<PARAM NAME=finChg VALUE=.12>
</APPLET></p>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<p align="left">NOTES:</p>
<ol style="margin-top: 18">
<li>
<p style="margin-bottom: 18">If the applet doesn't run, make
sure your browser is Java-enabled.</p></li>
<li>
<p style="margin-bottom: 18">Some browsers, such as <i>Internet Explorer</i>, may require "plug-ins".
Other browsers, such as <i>Mozilla Firefox</i>, may not.</p></li>
</ol>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<p align="left"> </p>
</BODY>
</HTML><!-- text below generated by server. PLEASE REMOVE --><!-- Counter/Statistics data collection code --><script language="JavaScript" src="http://hostingprod.com/js_source/geov2.js"></script><script language="javascript">geovisit();</script><noscript><img src="http://visit.webhosting.yahoo.com/visit.gif?us1139632765" alt="setstats" border="0" width="1" height="1"></noscript>
<IMG SRC="http://geo.yahoo.com/serv?s=76001404&t=1139632765" ALT=1 WIDTH=1 HEIGHT=1>
And this is the
Java:
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import java.text.*;
import java.lang.*;
public class App extends Applet {
public void init() {
resize(250, 50);
setLayout(new BorderLayout());
String rateAsString = getParameter("finChg"); // RETRIEVE HTML PARAMETER
double rate = valueOf("getParameter("finChg")"); // CONVERT TO PRIMITIVE FORM ???HOW???
NumberFormat nf = NumberFormat.getPercentInstance();
Label message = new Label("Finance charge: " + nf.format(rate));
message.setAlignment(Label.CENTER);
message.setFont(new Font("SansSerif", Font.BOLD, 18));
add(message, BorderLayout.CENTER);
}
}