blackberryjava-meblackberry-jde

Overriding paint method?


I was instructed to change the point color in a RadioButtonField, that little blue dot that appears on the selected item, as well as the color of a ButtonField when pressed, to orange. How can I make this?

I already changed the LabelField color by making a subclass and overriding the paint method.


Solution

  • I believe that underneath the hood the radio button is a pair of image files which is why there is not an API to modify aspects of the image such as colour.

    My suggestion to you is download the advanced UI classes (these are great to have anyway): http://supportforums.blackberry.com/t5/Java-Development/Implement-advanced-buttons-fields-and-managers/ta-p/488276

    Then use the BitmapButtonField or LabelSwitchField with your own radio button images.