Creating JApplet from JBUILDER
by Jenny Chang
California State University, Los Angeles
July 2, 2003
JBuilder Getting Started
The following is a general guideline in creating a JApplet
from JBuilder. Please note that the
following steps may vary depending on the version of JBuilder that you use.
- Open JBuilder
- Click File à New…
- The Object Gallery
dialog will appear. Select the
“Web” tab if you are using JBuilder 6 Enterprise, or the “New” tab if you
are using JBuilder 6 Personal version.
- Click on the applet icon and
click OK.

- The Project Wizard
dialog will appear. Type the name
for your project in the Name field (e.g. HelloWorldApplet)

- Click Next>
- Click Next>
again
- On the last step, click on
the Text field next to the Label field and type the information
as shown in the following screenshot while replacing my name with your own
name:

- Click Finish
- The Applet Wizard
dialog will appear. Type the Package
name and Class name.
Then click Next>

- Click Next>
- Click Finish
- Delete the code that is automatically
generated for you inside the class.
You should have something that looks like the following figure:

- Your class should extend or
inherit from JApplet. Thus, rename
Applet to JApplet.
- Remove the imported classes,
and import the following classes instead:
import java.awt.Graphics;
import javax.swing.JApplet;
- Your sourcecode should appear
as follows:

- Create the init and paint
method for your HelloWorld class.

- Congratulations, you have
successfully created a JApplet!