Help Center

Local Navigation

Create a dialog box

Use alert dialog boxes to notify users of a critical action such as turning off the BlackBerry® device or an error such as typing information that is not valid. An exclamation point (!) indicator appears in an alert dialog box. To close an alert dialog box, users can click OK or press the Escape key. For more information on other types of dialog boxes, see the API reference for BlackBerry® Java® Development Environment.

  1. Import the net.rim.device.api.ui.component.Dialog class.
  2. Create an alert dialog box specifying the alert text that you want to display.
    Dialog.alert("Specify the alert text that you want to display.")

Drop-down lists

Use drop-down lists to provide a set of mutually exclusive values.

Users can perform the following action with a drop-down list:

Action

BlackBerry devices with a trackpad only

BlackBerry devices with a touch screen and a trackpad

Click a value from a drop-down list.

Press the Enter key or click the trackpad.

  • Tap the item.
  • Press the Enter key.
  • Click the trackpad.
This screen shows a drop-down list.

Was this information helpful? Send us your comments.