Why use Math.min in below overridden method ?
protected void layout(int width, int height)
{
setExtent(Math.min( width, getPreferredWidth()), Math.min( height, getPreferredHeight()));
}
I seen this code in this question - BlackBerry - ButtonField with centered Bitmap