as we know,

we can fill a rectangular and rounded rectangular.

using API: fillRectangular() & fillRoundRectangular() [1]

and we can fill the gradation color of rectangular using API: fillShadedFilledPath() [2]

but, how can we fill the gradation color to rounded rectangular?

the answer is customizing method fillShadedFilledPath(). we can change the pointTypes from null (default value as CURVEDPATH_END_POINT) then mixing the END_POINT with CURVEDPATH_QUADRATIC_BEZIER_CONTROL_POINT.

you have to remember that:

  1. the count of array of xPts & yPts must be equal
  2. the count of array of its color must be equal too
  3. the count of array of its pointTypes must be equal too
  4. the sequence of CURVEDPATH_QUADRATIC_BEZIER_CONTROL_POINT, must between 2 point CURVEDPATH_END_POINT

[1] http://www.blackberry.com/developers/docs/4.3.0api/net/rim/device/api/ui/Graphics.html#fillRoundRect(int,%20int,%20int,%20int,%20int,%20int)

[2] http://www.blackberry.com/developers/docs/4.3.0api/net/rim/device/api/ui/Graphics.html#drawShadedFilledPath(int[],%20int[],%20byte[],%20int[],%20int[])