×

Discussion Board

Results 1 to 6 of 6

Thread: doubt in lwuit

  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    214

    Red face doubt in lwuit

    I have created the buttons for calculator and also the Textbox where the value would be shown .............I want to known how to show the value in textbox when the button 1 ,2,3,4,5,6,7,8,9,0,/,+,=,-,.is clicked in lwuit

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: doubt in lwuit

    I have created the buttons for calculator and also the Textbox where the value would be shown .............I want to known how to show the value in textbox when the button 1 ,2,3,4,5,6,7,8,9,0,/,+,=,-,.is clicked in lwuit
    You just need to update the Textbox using getString(), update and setSgtring() on the text box with every click on the button.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  3. #3
    Registered User
    Join Date
    May 2010
    Posts
    214

    Red face Re: doubt in lwuit

    Quote Originally Posted by im2amit View Post
    You just need to update the Textbox using getString(), update and setSgtring() on the text box with every click on the button.


    k so then should I need to write it in startApp r in ActionListener...................

  4. #4
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: doubt in lwuit

    k so then should I need to write it in startApp r in ActionListener...................
    You need to write this Textbox Update code in actionListner.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  5. #5
    Registered User
    Join Date
    May 2010
    Posts
    214

    Re: doubt in lwuit

    Can anyone tell me how to synchronize a textbox with a button in lwuit

  6. #6
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: doubt in lwuit

    Instead of the Textbox on the top, just use stringItem and update it using setString() from actionListener - no need to synchronize
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

Similar Threads

  1. Replies: 2
    Last Post: 2010-06-23, 13:50
  2. doubt in lwuit
    By kumarv75 in forum Mobile Java General
    Replies: 6
    Last Post: 2010-06-09, 05:06
  3. Replies: 0
    Last Post: 2010-04-20, 12:25
  4. LCDUI Alert on an LWUIT Form
    By slugger_2003 in forum Mobile Java General
    Replies: 0
    Last Post: 2010-04-18, 13:01
  5. lwuit and j2me
    By Arunesh in forum Mobile Java General
    Replies: 16
    Last Post: 2009-09-12, 15:49

Posting Permissions

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