Creating your project from a template
You can use a template to create a basic BlackBerry application project and then customize the code to suit your needs. You can also create your application from scratch by using an empty application template.
|
Template |
Description |
|---|---|
|
BlackBerry Application |
This template creates a basic UI application that contains a single screen. The template creates two Java source files, one for the application and one for the UI screen. |
|
Hello BlackBerry |
This template creates a UI application that contains a screen that is populated with some simple UI components. The template creates two Java source files, one for the application and one for the UI screen. |
|
Empty Application |
This template creates an empty BlackBerry device application. |
|
Empty Library |
This template creates an empty BlackBerry device library. |
UI screen templates
You can use a template to create a basic UI screen and then customize the code to suit your needs. The BlackBerry Java Plug-in for Eclipse provides templates for screen layouts that are typically used in BlackBerry device applications.
|
Template |
Description |
|---|---|
|
Main screen |
This template extends the MainScreen class to provide UI features that are common to BlackBerry device applications. |
|
Full screen |
This template extends the FullScreen class to create a UI screen that contains one vertical field manager. |
|
Popup screen |
This template extends the PopupScreen class to provide features for building dialog and status screens. |
Create a UI screen by using a template
Pre-requisite: Create a BlackBerry application project.
- In the Package Explorer view, expand a BlackBerry application project.
- Right-click the src folder and click New > Other.
- Expand the BlackBerry folder and click BlackBerry Screen.
- Click Next.
- In the Name field, type a name for the .java file.
- In the Screen type drop-down list, select the type of UI screen that you want to create.
- Click Finish.
Create a UI application by using a template
- On the File menu, click New > BlackBerry Project.
- In the Project name field, type a name for the project.
- Select Create new project in workspace.
- Complete one of the following tasks:
- To specify a specific JRE, select Use a project specific JRE.
- To specify the default JRE in the workspace, select Use default JRE.
- Click Next.
- Click Next.
- Click the template that you want to use.
- Click Finish.