Discussion Board

Results 1 to 6 of 6

Thread: doubt in lwuit

  1. #1
    Registered User kumarv75's Avatar
    Join Date
    May 2010
    Posts
    214
    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 im2amit's Avatar
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    2,903
    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
    (Poster of the Month -Dec'12)
    Follow me on my blog for Innovative Mobile Apps

  3. #3
    Registered User kumarv75's Avatar
    Join Date
    May 2010
    Posts
    214
    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 im2amit's Avatar
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    2,903
    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
    (Poster of the Month -Dec'12)
    Follow me on my blog for Innovative Mobile Apps

  5. #5
    Registered User kumarv75's Avatar
    Join Date
    May 2010
    Posts
    214
    Can anyone tell me how to synchronize a textbox with a button in lwuit

  6. #6
    Nokia Developer Champion im2amit's Avatar
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    2,903
    Instead of the Textbox on the top, just use stringItem and update it using setString() from actionListener - no need to synchronize
    thanks,
    ~Amitabh
    (Poster of the Month -Dec'12)
    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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved