MIDlet wizard

The MIDlet wizard creates a basic, fully-functional MIDlet consisting of the following two files which it adds to the currently opened project.

To open the MIDlet wizard, choose File|New, then double-click the MIDlet icon on the Micro page of the object gallery.

Important: You must create or open a project first before you can access the wizards on the Micro page of the object gallery.

Enter MIDlet class details

The wizard displays default names for the package and MIDlet class file.

Package

Displays the package name derived from the project file. To assign a different package name to the MIDlet file, click in the Package field and type in a new name.

For more information on packages, see the "Packages" topic in "Creating and managing projects" in Introducing JBuilder.

Class

Displays the default name assigned to the MIDlet class. To rename it, click in the Class field and type in a new name.

Generate header comments

Uses information from the project file as header comments at the top of the MIDlet class file. This is the information entered in the Project wizard when creating the project file.

//Title:        Your Product Name
//Version:    
//Copyright:    Copyright (c) 2001
//Author:       Your Name
//Company:      Your Company
//Description:  Your description

This option is unselected by default.

Enter Displayable class details

The information in this step defines the Displayable class which can be customized visually in the MIDP designer.

Class

A default name is entered for the class. Enter the name for the Displayable class if you don't want to use the default name.

Title

A default display String is entered for the class. Replace this with a String of your choosing. This is what displays at the top of the device screen at runtime.

Displayable type

Select the desired displayable superclass to extend. You can choose from javax.microedition.lcdui.Canvas, javax.microedition.lcdui.Form, javax.microedition.lcdui.List, or javax.microedition.lcdui.TextBox.

The default type is javax.microedition.lcdui.Form because it allows for the inclusion of multiple child components. javax.microedition.lcdui.Form is the only MIDP component that can contain another component.

Command handling

This option let's you specify how you want commands handled in the automatic code generation. Besides the standard adapter and anonymous adapter choices available in the Project Properties|Code Style page, you have two additional options: