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
Contributor
Posts: 10
Registered: ‎08-29-2012
My Device: 9860
My Carrier: Relience

How to change the color of label field

Hi,

Can any one suggest how to chenge the color of label field

 

 

Thanks,

sahil

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to change the color of label field

For the Background, use setBackground(..).  Review the Background and BackgroundFactory classes

 

If you want to change the text color, you will have to override the paint() method.  All you code is something like this:

 

public void paint(Graphics g) {

g.setColor(<your desired text color>):

supoer.paint(g);

}

 

Let us know if this is not enough.