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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 298
Registered: ‎05-02-2010
My Device: Bold 9700
My Carrier: Verizon
Accepted Solution

What the heck? How do I change the color for a simple border?

public static Border createSimpleBorder(XYEdges edges,
                                        XYEdges colors,
                                        int style)

 

How do I change the color of a simple border and why in the world is the colors parameter a XYEdges type?

 

What the heck? How is this properly used? I threw in some random numbers hoping for a color change, but I have nothing but a black border.

 

 

b = BorderFactory.createSimpleBorder(new XYEdges(1, 1, 1, 1), new XYEdges(77, 55, 22, 33), Border.STYLE_SOLID);

 

 

--Todd

Windows 7 Enterprise 64-bit (6.1 Build 7600) | Java SE Runtime Environment (build 1.6.0_24-b07) | Eclipse Version: 3.6.2 [M20110210-1200] | BlackBerry Eclipse Plug-in: 1.3.0.201102031007-19 | Java Compiler level: 1.3 | Targeting devices running OS 5 | Simulators: JDE 5.0 packaged 9700, 9630, 9300
Developer
Posts: 298
Registered: ‎05-02-2010
My Device: Bold 9700
My Carrier: Verizon

Re: What the heck? How do I change the color for a simple border?

Oooooooooohhhhhhhhhhhhhh... 0xAARRGGBB

 

AA = 0

RR = 256

GG = 0

BB = 0

 

 

 

b = BorderFactory.createSimpleBorder(new XYEdges(1, 1, 1, 1), new XYEdges(0, 256, 0, 0), Border.STYLE_SOLID);

 

 

--Todd

Windows 7 Enterprise 64-bit (6.1 Build 7600) | Java SE Runtime Environment (build 1.6.0_24-b07) | Eclipse Version: 3.6.2 [M20110210-1200] | BlackBerry Eclipse Plug-in: 1.3.0.201102031007-19 | Java Compiler level: 1.3 | Targeting devices running OS 5 | Simulators: JDE 5.0 packaged 9700, 9630, 9300
Developer
Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: What the heck? How do I change the color for a simple border?

255 should work much better than 256.

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!