Use buttons to allow users to perform an action from a dialog box. Menus typically include actions that are associated with a screen.

Users can perform the following actions with a button:


BlackBerry devices with a trackpad only

BlackBerry devices with a touch screen and a trackpad

Highlight a button.

Move a finger on the trackpad.

  • Touch the button lightly.
  • Move a finger on the trackpad.

Perform an action.

Click the trackpad or press the Enter key.

  • Tap the item.
  • Click the trackpad.
  • Press the Enter key.
This screen shows an example of a button.

Best practice: Implementing buttons

  • Avoid using buttons on an application screen. To provide actions that are associated with a screen, use the application menu instead. On BlackBerry® devices with a trackpad, the menu is available to users immediately, regardless of the position of the cursor on the screen. Buttons are static and require users to highlight a button to perform the associated action. If you use buttons, include menu items for the actions in the application menu as well. On BlackBerry devices with a touch screen, you can use buttons for critical actions.
  • Use check boxes for options such as turning on or turning off a feature.
  • Use the ButtonField class to create buttons. For more information about creating buttons, see the API reference for the BlackBerry® Java® SDK and the BlackBerry Java Application UI Quick Reference Guide.
  • For the default button, use the button that users are most likely to click. Avoid using a button that is associated with a destructive action as the default button.

Guidelines for labels

  • Use clear, concise labels.
  • Use one-word labels where possible. The size of a button changes depending on the length of the label. If a label is too long, an ellipsis (...) indicates that the text is truncated.
  • Use verbs for labels that describe the associated action (for example, "Cancel," "Delete," "Discard," or "Save"). If necessary, include more descriptive text elsewhere on the screen (for example, in an application message).
  • Avoid using the labels "Yes" and "No."
  • Avoid using punctuation in a label. Use an ellipsis in a button label to indicate that users must perform another action after they click the button.

Was this information helpful? Send us your comments.