|
 |
 |
Exercise
Write an application for the BlackBerry® device that uses BlackBerry user interface (UI) components, such as drop-down lists.
Objectives
- Discover how to use the IDE.
- Discover how a BlackBerry application is organized.
- Discover some of the basics of the BlackBerry user interface APIs.
Setup
- Download the file
- In the IDE, open the cityinfo.jdw workspace
- Open the CityInfo.java source file.
Tasks
- In the CityInfoScreen constructor, add code to display a drop-down list with the following options: “Los Angeles”, “Chicago,” and “NewYork.”
- Add a More Info menu item that displays the InfoScreen.
- In the InfoScreen inner class, add code to display fields for population, state, and sight-seeing information.
- Add code to display information depending on the city that the user selected. (Tip: use the select variable that has already been defined).
Check Your Work
Download the completed code
Review
In this exercise, you discovered the following things:
- how to use an ObjectChoiceField to create a drop-down list
- how to create custom menu items
- how to add text to fields depending on a user selection
Additional Labs
Go to the Next Exercise in “The Basics of Developing for BlackBerry”, Localizing an Application
Back to the Developer Lab Main Menu
|
|
|
|