APPLICATION DESIGN


Importing an applet
Before you import a Java(TM) applet, you must enable Java(TM) applets on your workstation and make sure all the related files are available on your workstation.

1. Open a page or form, or click in the rich text field of a document.

2. Choose Create - Java Applet.

3. In the Create Java Applet dialog box:

4. Click Locate to see all related files for the applet.

5. Browse for the applet files from the local file system, or from the Resources list, then do one of the following:

6. Click OK twice.

7. (Optional) Set applet parameters, attributes, and properties.

Getting the main class name

One way to make sure you have the correct name for the main class (which you enter in the Create Java Applet dialog box) is to use any text editor to open the associated *.HTML file and check for this HTML tag:

<applet code=filename.class>

For example, the main class name for the following Java(TM) applet is ArcTest.class.

<applet code=ArcTest.class width=400 height=400></applet>

Selecting related files

Applet files can be of the following types:


For most applets, you must select all class and resource files. Select the source files only if you plan to send the applet to another user who wants to export them and change the applet.

If you are inserting an applet that is packaged as a JAR file, you can enter the path and the main class name as described above. Note that browsing for the JAR file inserts the filename with a CLASS extension in the Class Name field. In some cases, the file name and the main class name are the same; in other cases, they are different and you must edit what appears in the Class Name field to be the correct main class name.

If you have more than one applet in a form, document, or page, IBM® Lotus® Notes® stores only one copy of common files.

Importing applets packaged as CAB or ZIP files

If you import an applet that is packaged as an archive file (such as either a CAB or ZIP file), consider the browsers the application users have:


Note At the Folder tab of the Java Applet Properties box, you can view the applet files from an applet you imported. If you did not import an applet, this field is blank.

See Also