Using Mobility File Templates


The process of creating files in Mobility projects is identical to that of creating files in general Java projects. Templates for creating MIDP classes can be found under the top-level MIDP category in the New File wizard, as shown in Figure 14-2. You can open the New File wizard by choosing File | New File.

Figure 14-2. New File wizard, MIDP templates


MIDP Canvas

To create a MIPDCanvas:

  1. Select MIDP Canvas in the File Types list and click Next.

  2. Optionally, modify the following fields in the Name and Location panel of the wizard:

    MIDP Class Name. The name for the new class.

    Package. The package in which the new class is located.

    The resulting Created File field shows the full path location of your new class.

  3. Click Finish.

MIDlet

The wizard for creating MIDlet file types differs slightly from that of other file templates in that it also collects information that is used in the application's JAD file.

  1. Select one of the MIDlet file types in the File Types list and click Next.

  2. Optionally, modify the following fields in the Name and Location panel of the wizard:

    MIDlet Name. This is the value that is shown in the list of MIDlets displayed when starting the application. It can be different from the MIDlet's class name.

    MIDP Class Name. The name for the new MIDlet class.

    MIDlet Icon. The location of this MIDlet's icon. The combo box contains all .png files located in your project.

    Package. The package in which the new MIDlet is located.

    The resulting Created File field shows the full path location of your new class.

  3. Click Finish.

All MIDlets that you add to the project are automatically added to the project's application descriptor.


Localization and Support Class

This is an advanced template that uses configurations; therefore, it is described in Localizing Applications later in this chapter.



NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 279

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net