MarvinSketch Example 3.1This molecule is loaded by the applet from a file named "caffeine.mol" which resides in the directory "../../mols-2d" (relative to the URL of this document).
The applet above was started in visualization (view only) mode (i.e., the editing buttons cannot be seen). You can get into editing mode by pressing the top left button in the AWT applet, or selecting View/Toolbar in the Swing applet. We have also used the autoscale parameter of the applet to fit the molecule into the window.
Usually this simple method of loading a molecule works well enough. However, sometimes it is better if the applet does not make any network connection, for instance if the user's computer is off-line, and the page with the applet comes from the browser's cache. The next example shows the solution for this situation.