|Introduction | Your first interface | Building a model | Advanced features | Resources|
2.6 Creating an applet
In this final step you will learn how to make your completed simulation into an applet.
An applet is a Java program that runs within a web browser, and the Interface Builder will automatically combine your interface with the model so that both can run together on the web. Create applets is a single step process with the Interface Builder - just choose Save to Web. (You will have had to decide on deployment conditions by using the Key Management sub menu. This step will only cover Save to Web, information on deployment is available in the Deploying Files topic.
To save your finished simulation to the web, select the File menu and the Save to Web option. You will then be prompted to chose a directory in which to save your applet - this can be any directory, but it is easier to keep track of your applets if you save each to a new directory.
When you save to web, the Interface Builder packages together all of the files that you will need to run your simulation independently as an applet, and places them in the directory of your choice. Within that directory an html file will also be created with the same name as your interface. As well as all the files needed for the applet, the interface builder also creates some text files which relate to Content Packaging. You will be asked if you also want to create a Package Interchange File (PIF file). Choosing this option will result in a .zip file being produced which can be stored within a Content Management system.
If you open that html file in a web browser, your applet will appear - it's as simple as that.
Congratulations! You have created your first applet. If you want to put it into one of your own web pages, all you have to do is copy the files and use the