Introduction to Java Applets
- Java programming language
- Distributive, interpreted, multithreaded, portable, object-oriented program
- Java Applet
- Small Java program that works within browsers
- How Applets work
- Java Source code --> Bytecode (.class files) --> JVM (Java Virtual Machine)
- Adding Applets to web pages
- Sample code: (Parade Ground)
- <applet code="pmvr.class" width=400 height=250>
<param name="image" value="main2b.jpg">
<param name="view" value="360">
<param name="pixdeg" value="0=250,906=90,2010=250">
<param name="center" value="906">
<param name="auto" value="1">
</applet>
<applet code="FloorPlan.class" name="FloorPlan" width=376 height=250>
<param name="image" value="Summerall3.gif">
<param name="x" value="190">
<param name="y" value="132">
</applet>
- <APPLET> tag
- The attributes are CODE, CODEBASE, HEIGHT, WIDTH, NAME, ALIGN
- The last 4 work as with an <img> tag. The only required attribute is the CODE - it names the class file to be used by the applet. The CODEBASE specifies the URL (or path) to the class file if not in the same directory as the HTML doc or on another computer.
- <PARAM> tag
- These tags control the way an applet works. They set the parameters of an appplet using NAME, VALUE pairs.
- Examples
- Samples from text: clocks, animation, scrolling text
- CSCI 217 Course Home page banner
- Panorama applets with hotspots, audio, and pop-ups
- HotMedia object movie and mathematical algorithm
- GSP Isomorphism demo
- Where to find applets
- See links on Course reference page
- Applet development Tools