I have created LWUIT TextArea
,and I have added paragraphs of text to my TextArea
,now i want to reduce my TextArea
's font size,I have used the code below:
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();
But, why I am not able to reduce the font of my text?
Use:
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();