Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set the size of text in label in LWUIT j2me

Is there any way to set the size(means font size,i want to make my text larger contaning font size of 17-20) of the text in the label in LWUIT for J2ME.

like image 352
ios developer Avatar asked Feb 24 '23 14:02

ios developer


1 Answers

You can set the large text by two ways.

  1. Use ResourceEdit and Create the new Large Font in Font tab. Then change the Label#Unselected font to that new Large Font.
  2. Use following code,

new Label("Sample").getStyle().setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_LARGE));

For more info see this article, Using Font with LWUIT

like image 133
bharath Avatar answered Apr 27 '23 21:04

bharath