Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
psutram
Posts: 10
Registered: ‎01-24-2010
My Device: Storm
My Carrier: Verizon

Drawing a Rounded Border

Hi All,

 

I am trying to create a rounded border around a GridFieldManager or a VerticalFieldManager with the following code.

 

XYEdges xy = new XYEdges (11,11,11,11);
XYEdges colors  = new XYEdges(Color.RED, Color.RED, Color.RED, Color.RED);
Border b = BorderFactory.createRoundedBorder(xy, Border.STYLE_FILLED);

gridManager.setBorder (b);

 

I can only only see straight borders if any. Can anyone please point me to a code snippet that works.

I am using 5.0 api's.

 

TIA,

Prashanth

 

Please use plain text.
Contributor
jacobtabak
Posts: 34
Registered: ‎03-14-2010
My Device: N/A
My Carrier: Fledge

Re: Drawing a Rounded Border

This may or may not be your problem, but you aren't using the correct constructor assuming that you want to use the colors you specified in the variable XYEdges colors.

 

Try this:

Border b = BorderFactory.createRoundedBorder(xy, colors, Border.STYLE_FILLED);

Please use plain text.
New Developer
joshualallen
Posts: 4
Registered: ‎01-01-2009
My Device: Pearl 8220

Re: Drawing a Rounded Border

Please use plain text.