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
New Developer
black_berry
Posts: 54
Registered: ‎11-12-2008
My Device: Bold 9800 or Storm 3 whichever hits Verizon first.

If you have an example of setting the font size

Hey all,

 

If you have an example of setting the font size for a JAVA application that runs on the blackberry and uses multiple screens would you please post some code so I can see how to set the font size and have it apply to the whole application and not just one particular screen.

 

Is this even possible?

 

Thank you all for your support
black_berry
Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: If you have an example of setting the font size

net.rim.device.api.ui.Font
public static void setDefaultFont(Font defaultFont)
Sets the default font for this application.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Rajat_10Sep
Posts: 696
Registered: ‎12-02-2008
My Device: Not Specified

Re: If you have an example of setting the font size

Hi,

 

there is one more way of setting font.

 

             try{            

                  objFontFamily = FontFamily.forName("BBMillBank");

 

               }catch(Exception e){
                        System.out.println(" Exception caught");
               } 

 

objLabelFont = objFontFamily.getFont(FontFamily.SCALABLE_FONT, 18).derive(Font.BOLD);

 

This will also help you in setting font.

 

 

Regards,
Rajat Gupta.
--------------------------------------------------------------------------------
If your problem was get solved then please mark the thread as "Accepted solution" and kudos - your wish