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
jtp5120
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
Please use plain text.
Developer
jtp5120
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
Please use plain text.
Developer
arkadyz
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!
Please use plain text.