![]() | CSCI A348/A548Lab Notes 8 Fall 1999 |
1. Create the source code of the applet.
For the purpose of this lab you will get the source code from me. We will install a fairly complex applet, and we will ignore the source code for now.2. Compile them (prepare the bytecode).Take the following files
from my home directory and put them in a special directory (called/u/dgerman/fall99/lab8/Matrix3D.java /u/dgerman/fall99/lab8/XYZApp.javalab8
) under your document root directory of your web server. Once you copy them you have the source code; that makes it as if you have written the source code yourself.
Use3. Prepare anjavac
to compile the source code. This will create a number of.class
files that may or may not be in one-to-one with the source code (java
) files. The number and names of the.class
files can be deduced from the actual contents of the source code files. Of those createdXYZApp.class
is the main file and we need to make a note of that.
.html
file to distribute the applet. Create an HTML file (call it4. Prepare data for the applet.index.html
) in the same directory that has an applet tag inside it that looks like this:Notice the<applet code=XYZApp.class width=100 height=100> <param name=model value=models/benzene.xyz> </applet>param
tag. It communicates important data to the applet, without which the applet won't run.
Create a directory5. Check your applet over the web.models
inside the folder that contains your Java applets code. Copy all the*.xyz
files fromto your/u/dgerman/fall99/lab8models
directory. They contain important rendering information for the applet. The fact that the applet is taking this info from a file is part of the actual design of the applet (it's a decision of the program writer).
You should see something like this.6. Improve your HTML interface.Remember to use your mouse to rotate the 'benzene' molecule. The HTML doesn't say anything about that (although it should).
Describe to the user what the page contains and what the user needs to do to interact with it. (See 7).7. Show all other molecule models.
Here's an example for the benzene and ethane models.
What to turn in and when
Follow the guidelines above to install the molecule viewer applet
before the due date, as posted. I will
check the generic URL (/lab8/handin.html
) for grading
purposes and to verify that the applets have been installed.