To add Java™ applets to a Web page, you must add them to a Web
project so the Web pages can access the applets.
Prerequisite: Create a Web project.
To create the applet and add it to a Web project:
Create a Java project to hold the Java applet
source and any related files.
Create a JApplet class, as follows:
From any project, select File > New > Other > Java > Visual Class.
In the Style list, expand Swing and
select Applet.
Set any other applicable attributes and click Finish.
Use the Visual Editor for Java to create the applet content, and debug
it using the Run as JavaBean option.
If there are more than class files only (the simplest case), including
image files, and any other files specified in the class files, you can create
a JAR to package the resources related to the applet.
Create a folder in the Web project under the Web content folder
(but not under the WEB-INF folder) to contain your Java applet class and JAR files.
Import the applicable applet and JAR binaries into the designated
Web project folder.
Once you have inserted JApplets in your Web pages, you should
run the pages through the HTML Converter. The converter will then automatically
convert the <APPLET> tags in your Web pages to tags that the Java plug-in
recognizes.