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
Developer
Posts: 22
Registered: ‎01-19-2009
My Device: Not Specified
Accepted Solution

How to set rounded corners in a Field?

I want to set rounded corners of a ListField, so I tried this:

this.setBorder(BorderFactory.createRoundedBorder(new XYEdges(1,1,1,1), Color.GRAY, Border.STYLE_SOLID));

 

 

and this don't run as I want, this only show a squared corners, someone know what is happing, What I made incorrectly?.

 

Thanks...

Highlighted
Developer
Posts: 5,339
Registered: ‎09-20-2008
My Device: ***
My Carrier: ***

Re: How to set rounded corners in a Field?

[ Edited ]

Maybe 1 pixel is too small amout of padding.

 

Try to make a XYEdges instance with bigger values, for example: (5,5,5,5)


Message Edited by tbilisoft on 30-05-2009 02:37 PM
Developer
Posts: 22
Registered: ‎01-19-2009
My Device: Not Specified

Re: How to set rounded corners in a Field?

Your are all right Tbilisoft, I changed the number of XYEdges instance to 10 and the field was painted with a rounded corners.

 

Thank you so much for your help.

Developer
Posts: 5,339
Registered: ‎09-20-2008
My Device: ***
My Carrier: ***

Re: How to set rounded corners in a Field?

You are welcome Smiley Happy