Padding
By default, widgets are tightly packed next to each other. If you want to increase the whitespace between widgets, you will want to use the property (or call at runtime on the widget’s Java object).
The padding specifies how much space there is between the boundaries of the widget’s “cell” and the actual widget contents. Padding is analogous to the margins on a word‑processing document – the page size might be 8.5”×11”, but 1” margins would leave the actual text to reside within a 6.5”×9” area.
The property allows you to set the same padding on all four sides of the widget, with the widget’s contents centered within that padded‑out area. If you want the padding to differ on different sides, use , , , and (see Figure 7‑1).
Figure 7‑1. The relationship between a widget, its cell, and the padding values
The value of the padding is a dimension, such as for 5 pixels’ worth of padding.
Дата добавления: 2015-05-16; просмотров: 719;