The JavaTM Tutorial

| Start of Tutorial > Start of Trail > Start of Lesson | Search Feedback Form

Trail: JavaBeans(TM)
Lesson: Using the BeanBox

## Using the BeanBox to Generate Applets

> You can use the BeanBox's File|MakeApplet... menu item to generate an applet from the BeanBox contents. Making an applet from the BeanBox creates:

> - A JAR file containing class files and serialized data
> - A test HTML file that uses the JAR file (and any other JAR files needed)
> - A subdirectory with Java sources and `makefile`
> - A `readme` file with complete information about the generated applet and all files involved

> Take the following steps to generate an applet from the BeanBox:

> 1. Use the Juggler example that you made in the events section. If you saved that example to a file, load it into the BeanBox using the File|Load menu item. If you didn't save it, follow the steps in the events section to build the example. The generated applet will have the same size as the BeanBox frame, so you might want to adjust the BeanBox size to the size of the applet you want.

> 2. Choose File|Make Applet to bring up the MakeApplet dialog:

>    Use the default JAR file and applet name for this example. Press the OK button.

> That's it. The generated files were placed in the `beanbox/tmp/myApplet` directory. You can inspect your handiwork by bringing up appletviewer in the following way:

> >     appletviewer <BDKInstallation>/beanbox/tmp/myApplet.html

> Here is what you will see:

> Don't forget to look at the generated `myApplet_readme` file, and the other files generated.

> Generated applets can be used in any JDK 1.1-compliant browser. The appletviewer is a good test platform. Another fully compliant browser is the HotJava browser .See the generated `readme` file for more information.

| Start of Tutorial > Start of Trail > Start of Lesson | Search Feedback Form

Copyright 1995-2004 Sun Microsystems, Inc. All rights reserved.