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:


Define MIDlet Configuration

JBuilder Personal can have only one runtime configuration.

This step allows you to create a new runtime configuration to use for running the MIDlet. See Setting runtime configurations" in Building Applications with JBuilder.

Create A Runtime Configuration

Indicates whether to create a new runtime configuration for running the MIDlet. If no configurations of this type exist yet for this project, this option will be checked by default. Otherwise, it is unchecked by default.

Configuration Name

Indicates the name for the new runtime configuration. The default name is the same as the MIDlet name. This field is only enabled if Create A Runtime Configuration is checked.

Base Configuration

Presents a list of other runtime configurations of the same type in the project from which you can choose to use as a template for creating this runtime configuration.