Creating a user interface
About
Lab,User Interface,BlackBerry UI
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
- Extract CityInfo_Incomplete.zip
- In the IDE, open the cityinfo.jdw workspace
- Open the CityInfo.java source
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
From CityInfo_Complete.zip
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

