How to Setup a NetLogo Applet on a web page.

See the applet setup guide in the NetLogo documention. It's quite complete.

http://ccl.northwestern.edu/netlogo/docs/applet.html

Also, when you use NetLogo's Save As Applet command, the resulting .HTML file itself contains detailed instructions.

What follows is a barebones summary.

To run a NetLogo model on a web page, you need at least four things:

  1. The NetLogoLite.jar file from the NetLogo program installation directory.
  2. The .nlogo file that is your model
  3. The .html file that contains the applet code
  4. A web-site to upload these files to.

In the sample below, xxx must be replaced with the width of the model, in pixels. yyy must be replaced with the height, and zzzzzzzzzz must be replaced with the name of your model.

The .html file, at minimum, looks like this:

<html>
  <head>
    <title>My NetLogo Model: zzzzzzzzzz</title>
    </head>
  <body>
    <p>
    <applet code="org.nlogo.window.Applet"
             archive="NetLogoLite.jar"
             width="**xxx**" height="**yyy**">
       <param name="DefaultModel"
             value="**zzzzzzzzzz**.nlogo">
    </applet>
  </p>
  </body>
</html>
 
guide/applet.txt · Last modified: 2009/11/05 10:35 by james
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki