With project templates, the IDE controls all aspects of how your application
is built, run, and debugged. You set a project's source directory, classpath,
emulator platform, and other project settings when creating the project and
in the Project Properties dialog box.
The NetBeans comes with the following Java ME project templates:
MIDP Application. An empty Java ME MIDP project with a
main class. You can choose to create the project with a Hello MIDlet as well.
Choosing the Hello MIDlet opens the Visual
Mobile Designer.
Mobile Class Library. An empty Java ME class library with
no main class. Use this template to create a library within an existing project.
Mobile Project with Existing MIDP Sources. A Java ME MIDP
project created from an existing source folder.
Import Wireless Toolkit Project. A Java ME MIDP project
that imports a project created previously in the Sun Java Wireless Toolkit.
CDC Application. Creates a new CDC application in a standard
IDE project. You can also generate a main class in the project. Standard projects
use an IDE-generated Ant build script to build, run, and debug your project.
CDC Class Library. Creates a new CDC library in a standard
IDE project. A CDC library does not contain a main class.
Import CDC Pack 5.5 Project. Imports an existing NetBeans
Mobility Pack 5.5 for CDC project into a current NetBeans IDE project. Source
files are referenced from the original project.
Import CDC Toolkit Project. Imports an existing Sun Java
Toolkit for CDC project into current NetBeans IDE. Source files are
referenced from the original project.
Mobile Designer ComponentsCreates an empty Visual Mobile
Designer Component module. The new NetBeans module will be created within Visual
Mobile Designer Components and Java SE Library Descriptors.
With file templates, you specify a project, file name and location. The IDE
creates the basic structure of the file, and adds it to the Application Descriptor
file. CLDC projects create MIDlets. CDC projects create Xlets. Besides standard
file templates known from J2SE projects (for example, Java class, Java interface,
XML file, and others), Java ME projects for CLDC and CDC offer the following
templates:
MIDP file templates:
MIDlet. A basic executable class for a mobile device.
MIDP Canvas. Creates a subclass of the Canvas class. The
Canvas class gives full control over the appearance of the user interface,
but may not be portable across devices.
Visual Design. Opens the Visual
Mobile Designer and provides a fragment of code that can be used to create
a MIDlet.
Game Builder. Opens the Game Builder and provides a framework for creating Java ME games.
Empty JMUnit Test. Creates a test skeleton using the JMUnit
framework.
Localization Support Class. Creates a LocalizationSupport.java
file and a messages.properties file where you add keys and values
for localized elements of the UI.
Mobile Client to Web Application. A wizard that creates
all the code needed to access a web application from a MIDP application. It
generates a servlet and a Java ME class that connects to an existing web application
through the servlet. Optionally, you can use the wizard to create a mobile
client that uses an existing web service through servlet middleware.
Java ME Web Service Client. A wizard that creates the code
to access Web services using the
standard.
CDC file templates:
AGUI Xlet Form. Creates a new Xlet for applications using
the AGUI profile. This template contains form code that allows you to design
the Xlet visually in the Form Editor.
Personal Profile Xlet Form. Creates a new Xlet for applications
using the Personal Profile. This template contains form code that allows you
to design the Xlet visually in the Form Editor.
Xlet. Creates a new xlet .This template does not contain
form code that allows you to design the Xlet visually in the Form Editor.
For visual design, start with the AWT template under Java GUI Forms.
Ricoh Xlet. Creates a new Ricoh xlet.
CrEme JFrame Form. Creates a new JFC (Swing) Frame for
CDC devices. Frames are typically used as standalone top-level windows in
the main user interface to the application. Most Swing applications are built
starting from this form.
Other file templates:
SVG File. Creates an empty Scalable Vector Graphics (SVG) Tiny 1.1 file. You can edit the file in the IDE's Source Editor or launch an external editor to make changes to the file.