MarvinView Example 1.1

The basic applet tag that works with AWT, Swing, with and without Java-Plugin is similar to the one in MarvinSketch Example 1.1.
<script LANGUAGE="JavaScript1.1" SRC="../../marvin.js"></script>
<script LANGUAGE="JavaScript1.1">
<!--
// marvin_jvm = "builtin"; // "builtin" or "plugin"
// marvin_gui = "awt"; // "awt" or "swing"
mview_begin("../..", 200, 200);
mview_param("mol", "../../mols-2d/caffeine.mol");
mview_end();
//-->
</script>

Warning: Scripting (JavaScript to Java communicaton) does not work in Netscape 4.x with the Java Plugin. Use the built-in JVM if you need scripting.

The traditional applet tag for MarvinView/AWT and the built-in JVM is the following:

<applet CODEBASE="../.." ARCHIVE="marvin.jar" CODE="MView" WIDTH=200 HEIGHT=200>
<param NAME="mol" VALUE="../../mols-2d/caffeine.mol">
<strong>(YOU CANNOT SEE A JAVA APPLET HERE)</strong>
</applet>
To use Swing instead of AWT, you have change the following attributes: ARCHIVE="jmarvin.jar" and CODE="JMView.class".


And now let us customize it.