Applet Wrapper wizard
The Applet Wrapper Wizard converts an applet into a JavaBean component. This wizard creates a new Bean class, wrapped around an applet to turn the applet into a Bean. The wrapper class gives the applet a context to make the applet think it is on an HTML page. The wrapper class also surfaces the applet parameters as Bean properties.
This wizard creates getter and setter methods for the parameters of an applet, enabling you to install the applet in the Component Palette. The applet component can then be used via the visual design tools. The Beans on the Sun Applets tab of the Component Palette are examples of applets that have been converted into Beans.
The parameters of an applet are stored on the HTML page. If there are parameters on the HTML page, another page of the applet wrapper wizard appears, enabling you to configure the parameters.
If there are multiple applets imbedded in the HTML page, another page of the applet wrapper wizard appears, enabling you to select which applet to wrap.
To wrap an applet:
- Create a new applet, or identify an existing applet, that you want to turn into a Bean.
- Place the applet into a project and compile the project.
- Choose Wizards|Wrap Applet.
- Confirm that the correct class is listed.
- Enter any modifications or default values for the parameters to be exposed by the Bean.
- Click the Finish button.
- You can now deploy the Bean, or place it on the Component Palette, for use as a Bean.
See also:
Wrapping an applet