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

Posts: 22
Registered: ‎10-30-2009
My Device: Not Specified

How to draw bold text in custom field?



I am using JDE 4.7 plugin in eclipse.

In my application I am using a custom field which as to draw some text.

Currently it is drawing the text in plain font. But I don't know how to draw bold text.

I have overriden the paint method and I am using the graphics.drawText method.

How do I draw the text in bold format?


Thanks for your help in advance.


Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: How to draw bold text in custom field?

Look at the graphics.getFont() and graphics.setFont() methods, as well as font.derive().  Before you call graphics.drawText(), you can do something like this:






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