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
vingilot
Posts: 224
Registered: ‎03-29-2012
My Device: 9900
My Carrier: Wind
Accepted Solution

Border Issue

Hey all, I'm creating some customButtons using the basic template released by BB and was wondering how to get rid of the border? I have darker coloured buttons which generate an awful color border when created and was wondering how to address this issue.  I have tried creating a border with custom XYedges, however this had no effect. What is the simplest way to address the problem?

 

as Always, thanks guys.

Please use plain text.
Developer
maadani
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: Border Issue

setBorder(BorderFactory.createRoundedBorder(new XYEdges(), Border.STYLE_TRANSPARENT));

 

E.

Please use plain text.
Developer
vingilot
Posts: 224
Registered: ‎03-29-2012
My Device: 9900
My Carrier: Wind

Re: Border Issue

Hmm, this had no effect, there is still a purple band around the button, i'm not sure why there would still be a border.

Please use plain text.
Developer
maadani
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: Border Issue

Maybe it's not the border.

 

It could be the focus or something that is painted in the paint() or in paintBackground().

 

Try overriding the methods:

 

1. drawFocus

2. paint

3. paintBackground

 

And see if it has an effect.

 

E.

 

Please use plain text.
Developer
vingilot
Posts: 224
Registered: ‎03-29-2012
My Device: 9900
My Carrier: Wind

Re: Border Issue

fixed it, it was in the paint method, thanks!

Please use plain text.