import java.awt.*; import java.applet.*; public class SimpleApplet extends Applet { public void init() { } public void paint( Graphics g) { } public void destroy() { } } |
there are three basic methods that should be provided
|
<APPLET>
tag:
<APPLET CODE=applet.class WIDTH=width HEIGHT=height> <PARAM NAME=name1 VALUE=value1> <PARAM NAME=name2 VALUE=value2> <PARAM NAME=name3 VALUE=value3> ... </APPLET> |
However many sites disable java at the firewall so your applet may not appear to work in these cases. Most firewalls prevent java files from getting past them by looking for a ".class" extension. Both Netscape and Microsoft provide mechanisms to get around this.
Netscape Navigator |
<APPLET>
tag to read:
<APPLET archive=myarchive.zip CODE=applet.class WIDTH=width HEIGHT=height> <PARAM NAME=name1 VALUE=value1> <PARAM NAME=name2 VALUE=value2> <PARAM NAME=name3 VALUE=value3> ... </APPLET> |
Internet Explorer |
archive
attribute of the <APPLET> tag
. It
uses CAB
(Cabinet)
CAB
cabbase
<APPLET CODE=applet.class WIDTH=width HEIGHT=height> <PARAM NAME=name1 VALUE=value1> ... <PARAM NAME=cabbase VALUE=mycabinet.cab> ... </APPLET> |
<PARAM>
The <PARAM> provides parameters that the
applet should read in its init()
method.
These generally control the applet's appearance and are not designed to be substitutes for a user interface.
|
|
|
The arguments are all passed as strings. If they need to be converted there should be adequate error handling to use default values if the conversion fails. |
file: /Techref/language/JAVA/nosugar/basics/index.htm, 5KB, , updated: 1997/1/28 16:19, local time: 2024/12/2 10:37,
3.142.212.119:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://sxlist.com/Techref/language/JAVA/nosugar/basics/index.htm"> Learning Java [basics]</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.