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: 105
Registered: ‎07-19-2009
My Device: Not Specified
Accepted Solution

How to Change the Font Color?

I want to show the Label Field in Red color. How to change the Font Color in Blackberry?

 

 

Thanks for any help.

Developer
Posts: 155
Registered: ‎02-18-2009
My Device: Not Specified

Re: How to Change the Font Color?

Did you even bother to search the forum ? :smileywink:

 

Anyway.. try this

 

 

public class ColorLabel extends LabelField { private int color; public ColorLabel(Object text, long style, int color) { super(text, style); this.color = color; } public void paint(Graphics g) { g.setColor(color); super.paint(g); } }