2012-08-09 85 views
4

我已經創建了LWUIT TextArea,並且我已將段落文本添加到我的TextArea,現在我想要減少我的TextArea的字體大小,我已經使用了下面的代碼:如何減少LWUIT中文本的字體文本區域

TextArea big = new TextArea(detailNews.getDescription()); 
Font createSystemFont = Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_ITALIC, Font.SIZE_SMALL); 
    big.getStyle().setFont(createSystemFont); 
    big.setEditable(false);      
    form2.addComponent(big); 
    form2.show(); 

但是,爲什麼我不能減少我的文本的字體?

+0

接受更多的答案 – Mun0n 2012-08-09 07:04:44

回答

0

用途:

TextArea big = new TextArea(detailNews.getDescription()); 

Font createSystemFont = Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_ITALIC,Font.SIZE_SMALL); 

big.getUnselectedStyle().setFont(createSystemFont); 
big.getSelectedStyle().setFont(createSystemFont); 

// Added TextArea object big to the Form object form. 
form.addComponent(big); 
form.show();