Box model

The BlackBerry® Java® SDK uses a box model that is similar to the HTML or CSS box model to draw and arrange UI components on a screen. Every field is composed of four elements:

  • Content: The content to display in the field, such as text or graphics.
  • Padding: The area of space between the padding and the border.
  • Border: The visual boundary that surrounds the field.
  • Margin: The area of space that is outside of the border.

You can apply padding, border, and margin values to all classes that extend the Field class, including prebuilt UI components, screens, managers, and custom fields.

Next topic: Padding
Previous topic: Fields

Was this information helpful? Send us your comments.