×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Jul 2012
    Location
    India
    Posts
    103

    How to reduce the Font of a text from LWUIT TextArea

    Hi
    I have created LWUIT TextArea,and i added paragraphs of text to my Text area ,now i want to reduce my text area font size,i have used the below code:

    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 i am not able to reduce the font of my text?
    How to align the paragraph of text on text area?

  2. #2
    Nokia Developer Expert
    Join Date
    May 2012
    Location
    Espoo
    Posts
    224

    Re: How to reduce the Font of a text from LWUIT TextArea

    Which version of LWUIT binary used? And what platform is it tested(S40 or Symbian)?

    I tested with following code in s40 using the lwuit binary got it from https://projects.developer.nokia.com..._for_Series_40 and works for me.
    f = new Form(null);

    TextArea big = new TextArea("this is lwuit textarea");
    Font createSystemFont = Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_ITALIC, Font.SIZE_SMALL); // use Font.SIZE_LARGE for testing
    big.getStyle().setFont(createSystemFont); big.setEditable(false);
    f.addComponent(big);
    f.show();

  3. #3
    Registered User
    Join Date
    Jul 2012
    Location
    India
    Posts
    103

    Re: How to reduce the Font of a text from LWUIT TextArea

    HI bandarap,

    I am using the LWUIT jar file from this url http://www.java2s.com/Code/Jar/l/DownloadLWUITjar.htm, and i am using Nokia SDK 1.1 Device,
    As your suggestion, i have downloaded LWUIT series 40 from this URL: https://projects.developer.nokia.com..._for_Series_40 , can you tell me from that which jar file i need to use....,instead of previously using jar file..



    Quote Originally Posted by bandarap View Post
    Which version of LWUIT binary used? And what platform is it tested(S40 or Symbian)?

    I tested with following code in s40 using the lwuit binary got it from https://projects.developer.nokia.com..._for_Series_40 and works for me.

  4. #4
    Nokia Developer Expert
    Join Date
    May 2012
    Location
    Espoo
    Posts
    224

    Re: How to reduce the Font of a text from LWUIT TextArea

    please read "Choosing JAR" section of readme.txt file in LWUIT for S40 binary.

  5. #5
    Registered User
    Join Date
    Jul 2012
    Location
    India
    Posts
    103

    Re: How to reduce the Font of a text from LWUIT TextArea

    i choosed LWUIT MIDP.jar from txt file, according to my spec,but i am not able to run my application

    Quote Originally Posted by bandarap View Post
    please read "Choosing JAR" section of readme.txt file in LWUIT for S40 binary.

  6. #6
    Nokia Developer Expert
    Join Date
    May 2012
    Location
    Espoo
    Posts
    224

    Re: How to reduce the Font of a text from LWUIT TextArea

    text from the readme.txt file
    Applications using LWUIT jars under specific release folder are expected to compile and run on the same release but in earlier versions they only run but do not compile.
    in your case, choose the jar Series-40-binaries-TP2u2\bin\sdk1.1\S40-with-themes.jar

  7. #7
    Registered User
    Join Date
    Jul 2012
    Location
    India
    Posts
    103

    Re: How to reduce the Font of a text from LWUIT TextArea

    I have used s40-with-themes.jar also ,it is not working....



    Quote Originally Posted by bandarap View Post
    text from the readme.txt file
    in your case, choose the jar Series-40-binaries-TP2u2\bin\sdk1.1\S40-with-themes.jar

  8. #8
    Registered User
    Join Date
    Jul 2012
    Location
    India
    Posts
    103

    Re: How to reduce the Font of a text from LWUIT TextArea

    Here the sample Code For TextArea Font size:

    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);

    add big to form
    form.addComponent(big);
    form.show();

Similar Threads

  1. LWUIT TextArea Problem
    By zzwei in forum Mobile Java General
    Replies: 4
    Last Post: 2012-09-20, 10:12
  2. [moved] LWUIT Textarea with multilines
    By kenthan in forum Mobile Java General
    Replies: 2
    Last Post: 2012-06-21, 11:00
  3. Replies: 3
    Last Post: 2011-07-19, 07:50
  4. Replies: 1
    Last Post: 2010-12-01, 04:45

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×