Add .Java Source Files To The Project For The Helloworld Application; Import Resources Into Helloworld.java; Provide A Ui For A Helloworld Application; Allow The Helloworld Application Start Sending And Receiving Events When The Application Starts - Blackberry JAVA DEVELOPMENT ENVIRONMENT Getting Started Manual

Device application development
Hide thumbs Also See for JAVA DEVELOPMENT ENVIRONMENT:
Table of Contents

Advertisement

Getting started guide

Add .java source files to the project for the HelloWorld application

The .java source file name must match the name of the public class or interface in the file. It must also be located
in a folder structure that matches its package name.
For example, if the workspace file is C:\name\ws.jdw and it contains a
must name the project (.java) source file MyClass.java, and store it in C:\name\com\mycompany\MyClass.java.
1.
In the Navigator view, select a BlackBerry project.
2. Right-click the project and select Add File to Project.
3. In the File Name field, type HelloWorld.
4. Click Open.

Import resources into HelloWorld.java

net.rim.device.api.ui
The
for constructing the UI of a BlackBerry device application.
net.rim.device.api.ui.component
The
controls for constructing usable UIs for BlackBerry device application.
net.rim.device.api.ui.container
The
for constructing a usable UI for BlackBerry device application.
net.rim.device.api.system
The
net.rim.device.api.ui
>
In the Text Editor window and underneath the line that begins with the word package, type the following:
import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;
import net.rim.device.api.system.*;

Provide a UI for a HelloWorld application

1.
Modify the
HelloWorld
public class HelloWorld extends UiApplication
2. Create a constructor for the
public HelloWorld() {
}
Allow the HelloWorld application start sending and receiving events when the
application starts
The
UiApplication
class is the base class for all BlackBerry® device applications that provide a UI.
12
package provides a BlackBerry® device application with fundamental functionality
package provides a library of prebuilt interface components and
package provides a library of prebuilt interface component mangers
package provides a variety of system-level functionality. See
in the API Reference for more information.
class declaration to extend the
HelloWorld
class.
com.mycompany.MyClass
UiApplication
class.
class, then you

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the JAVA DEVELOPMENT ENVIRONMENT and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents