How to Call Applet from Oracle Java Application?
Date: 1998/07/14
Message-ID: <35AB5AA8.550A_at_amoco.com>#1/1
There is a sample java applet that comes with the JDK.... Chart.java under the directory demo/BarChart. How can I call this applet from my java application? I can display the applet with the example1.html that is provided in JDK examples. But I cannot get it to display from a java application. Can anyone help? The error message: Applet can't start: error: java.lang.ClassFormatError.
I am working on an Oracle Webserver using Oracle class extensions in the java cartrige to build html.
Thanks,
Lana Nelson
Please email lhnelson_at_amoco.com
My code follows:
import java.io.*; import java.lang.*; import java.net.URL;
//
public class call_barchart {
public static void main(String args[])
{
HtmlHead hd = new HtmlHead("SEO Unix Inventory - Chart");
HtmlBody bd = new HtmlBody();
Applet applet = new Applet("Chart.class", 251, 125);
applet.addParam("c2_color", "green"); applet.addParam("c2_label", "Q2"); applet.addParam("c1_style", "striped"); applet.addParam("c4", "30"); applet.addParam("c3", "5"); applet.addParam("c2", "20"); applet.addParam("c4_color", "yellow"); applet.addParam("c1", "10"); applet.addParam("c4_label", "Q4"); applet.addParam("title", "Performance"); applet.addParam("c3_style", "striped"); applet.addParam("columns", "4"); applet.addParam("c1_color", "blue"); applet.addParam("c1_label", "Q1"); applet.addParam("c3_color", "magenta"); applet.addParam("c3_label", "Q3"); applet.addParam("c2_style", "solid"); applet.addParam("orientation", "horizontal"); applet.addParam("c4_style", "solid"); applet.addParam("scale", "5");
bd.addItem(applet);
// Print header info
hp.printHeader();
// Print body
hp.print();
}
Received on Tue Jul 14 1998 - 00:00:00 CEST