Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    May 2013

    How to change the text in a label?

    I have written something in my label and displayed it on form.(i am new to j2me working on s40 app ..using sdk 2.0)
    Now when i am running my midlet again another label is formed at the bottom of previous label.

    I want the label should be same and new text to be displayed on it.

    How to do it?

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Noida, India

    Re: How to change the text in a label?

    Cut paste your code let, instead of appending the Label again and again, just use setText() to update the text already displayed on the label.

    Are you using LCDUI or LWUIT ?
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  3. #3
    Registered User
    Join Date
    May 2013

    Re: How to change the text in a label?

    sir i was switching from lwuit to lcdui and after working with the code of datefield(that u helped me with) i am switching back to lwuit because all my UI will be in lwuit.

    I used the code addcomponent at wrong place. Th code is now working fine sir.

    Thank you sir, Plz keep guiding as i am new to s40 apps.

Similar Threads

  1. How to change color of label??
    By rohit.shah in forum Symbian User Interface
    Replies: 4
    Last Post: 2010-12-14, 09:11
  2. How to change the label text style to italics
    By vicky_nits in forum Symbian
    Replies: 8
    Last Post: 2010-07-26, 12:37
  3. Change label text from user thread
    By tomass311 in forum Symbian
    Replies: 4
    Last Post: 2009-11-02, 19:18
  4. Replies: 5
    Last Post: 2009-05-08, 09:53
  5. Change color of Label
    By nital_shah in forum Symbian
    Replies: 3
    Last Post: 2008-06-30, 11:13

Posting Permissions

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