Netbeans web projects and Applets
- To add an applet to a Netbeans web project use the
following
procedure.
- Create your applet in a separate project. when you are done
testing, use the build function to create the jar file.
- Switch to your web project,
- select the project and right click to open the properties
- select packaging under the Build item
- press the "add jar/folder"
- then browse to the jar file you created in the applet project
(under the applet projects' dist folder)
- select the jar file.
- this adds the jar to your web project.
- On your web page, you can reference the applet with the applet
tag, the ARCHIVE parameter should be the jar name you added in the
previous line.
- Alternatively, you can create your applet in a separate project,
then perform the build operation to create a jar file. Copy this
jar file into the web folder of your web application project.