Add .Java Source Files To The Project For The Cityinfo Application; Import Resources Into Cityinfo.java; Provide A Ui For The Cityinfo Application; Allow The Cityinfo 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

10. Click OK.

Add .java source files to the project for the CityInfo 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 CityInfo.
4. Click Open.

Import resources into CityInfo.java

net.rim.device.api.i18n
The
net.rim.device.api.i18n
application. See
>
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.*;
import net.rim.device.api.i18n.*;

Provide a UI for the CityInfo application

1.
Modify the
CityInfo
public class CityInfo extends UiApplication
2. Create a constructor for the
public CityInfo() {
}
Allow the CityInfo application start sending and receiving events when the
application starts
1.
Create a main method for the BlackBerry® device application.
public static void main(String[] args){
}
package provides support for the internationalization of BlackBerry® device
in the API Reference for more information.
class declaration to extend the
CityInfo
class.
2: Create a BlackBerry device application with advanced UI features
com.mycompany.MyClass
UiApplication
class.
class, then you
17

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

Table of Contents