Create a Custom Project Template
(Step 3)
The goal of this step is to create a custom project template for next step.
- Open the "Tools" menu in the tool bar, then click on the Environment
Options. An "Environment Options" dialog will appear.
- Click Internal VM tab on the top.
- Select the CLASSPATH that created on step 1, then click Del
button to remove it from the class path list.
- Push New... button to open a file chooser to select cdev.jar
and adm.jar file as class path. If they are not appear on the top,
use the Up button to move to the top (Fig. 3a).
- Click OK button, exit and restart visual café to take effective
the change
|
---|
Fig. 3a |
- Open the File menu in the tool bar, then click on the New
project.
- Select AWT Application or AWT Applet icon to create an
AWT application/applet named Untitled1. Double click on Form
Designer frame on the right to open a "Event Binding" dialog. And
then click on the Open Source button on the lower left corner
of the dialog to open a source editor. Edit the source code by adding
"import adm.*;" and changing "public class Applet1 extends Applet"
"public class Applet1 extends CApplet". or "public class Frame1
extends Frame" to "public class Frame1 extends CApplication". For Adm
Applet "super.init();" also need be added at the first line of the init
method. The new edited Adm Applet source code window is shown in Fig. 3b.
|
---|
Fig. 3b |
For Adm Application you also can choice following step:
Select Empty Project icon to create a new empty project named
Untitled1. Drag the CApplication icon in the component palette
and drop into Project - Untitle1 frame.
- You can skip this step if you are working on Adm Applet
Open the Project menu in the tool bar, and then click on the
Options... to open "Project Options" dialog. Select Project
tab on the top of the dialog. And type CApplication1 (or Frame1) into
Main Class textField then click OK button to back to main window.
- Go to Project menu in the tool bar, and then select the Create
Project Template to bring up "Create Project Template" frame.
- In the new frame enter the project template name "Adm Application" or
"Adm Applet" and description, and then click OK button to create
an adm application or adm applet project template.
(Fig. 3c).
|
---|
Fig. 3c |
Now the Adm Application or Adm Applet is added to the
Visual cafe project template.