10 Replies - 3074 Views - Last Post: 03 July 2013 - 10:06 PM

#1 manpreet_singh  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 03-July 13

I am working on nokia s40 app. I am using spinner component of lwuit

Posted 03 July 2013 - 02:22 AM

I am working on s40 app using sdk 2.0 for java.
I am using spinner component of lwuit 1.3.
I am able to display the spinner .
How to get selected value while spinning the spinner component. I want to store that value in string.
Please guide.

Regards,
Manpreet
Is This A Good Question/Topic? 0
  • +

Replies To: I am working on nokia s40 app. I am using spinner component of lwuit

#2 Flukeshot  Icon User is offline

  • A little too OCD
  • member icon

Reputation: 415
  • View blog
  • Posts: 1,030
  • Joined: 14-November 12

Re: I am working on nokia s40 app. I am using spinner component of lwuit

Posted 03 July 2013 - 02:26 AM

What have you tried?

A good place to start looking would be the JSpinner API Documentation.
Was This Post Helpful? 0
  • +
  • -

#3 farrell2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 822
  • View blog
  • Posts: 2,529
  • Joined: 29-July 11

Re: I am working on nokia s40 app. I am using spinner component of lwuit

Posted 03 July 2013 - 08:00 PM

View Postmanpreet_singh, on 03 July 2013 - 09:22 AM, said:

I am working on s40 app using sdk 2.0 for java.
I am using spinner component of lwuit 1.3.
I am able to display the spinner .
How to get selected value while spinning the spinner component. I want to store that value in string.
Please guide.

Regards,
Manpreet


Try getValue()

View PostFlukeshot, on 03 July 2013 - 09:26 AM, said:

What have you tried?

A good place to start looking would be the JSpinner API Documentation.


Swing != LWUIT, forum leader. :tt2:/>

I now that you really just read his question too quickly. What an horror!!!

This post has been edited by farrell2k: 03 July 2013 - 08:02 PM

Was This Post Helpful? 0
  • +
  • -

#4 Flukeshot  Icon User is offline

  • A little too OCD
  • member icon

Reputation: 415
  • View blog
  • Posts: 1,030
  • Joined: 14-November 12

Re: I am working on nokia s40 app. I am using spinner component of lwuit

Posted 03 July 2013 - 08:07 PM

Too quickly or too sleepily, I'm not sure which. A mistake regardless - Sorry! :P
Was This Post Helpful? 0
  • +
  • -

#5 manpreet_singh  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 03-July 13

Re: I am working on nokia s40 app. I am using spinner component of lwuit

Posted 03 July 2013 - 08:40 PM

this question is from j2me . I guess i am posting it in wrong forum. I will not be getting any valid answers here.
Anyways thansk everyone.
@flukeshot...this question is not on swings. There is a world outside swings too :)
@farrell2k... i tried this but it is not giving current value ..anyways thanks. I should try it in other forums.
Was This Post Helpful? 0
  • +
  • -

#6 farrell2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 822
  • View blog
  • Posts: 2,529
  • Joined: 29-July 11

Re: I am working on nokia s40 app. I am using spinner component of lwuit

Posted 03 July 2013 - 08:58 PM

View Postmanpreet_singh, on 04 July 2013 - 03:40 AM, said:

this question is from j2me . I guess i am posting it in wrong forum. I will not be getting any valid answers here.
Anyways thansk everyone.
@flukeshot...this question is not on swings. There is a world outside swings too :)/>
@farrell2k... i tried this but it is not giving current value ..anyways thanks. I should try it in other forums.


Blah. You just don't know what the hell you're doing. If you create a numeric spinner

Spinner spinner = Spinner.create(0,100,0,1); //numeric spinner 0 to 100 with 1 step increments.

Integer value =  Integer.valueOf(spinner.getValue().toString());



There's your value. Simple
Was This Post Helpful? 0
  • +
  • -

#7 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10369
  • View blog
  • Posts: 38,408
  • Joined: 27-December 08

Re: I am working on nokia s40 app. I am using spinner component of lwuit

Posted 03 July 2013 - 08:59 PM

Moved to Mobile Development.
Was This Post Helpful? 0
  • +
  • -

#8 manpreet_singh  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 03-July 13

Re: I am working on nokia s40 app. I am using spinner component of lwuit

Posted 03 July 2013 - 09:28 PM

no no the value each time user change . I want to get that value . I know i will be needing listeners here.
So how to do it?
Was This Post Helpful? 0
  • +
  • -

#9 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10369
  • View blog
  • Posts: 38,408
  • Joined: 27-December 08

Re: I am working on nokia s40 app. I am using spinner component of lwuit

Posted 03 July 2013 - 09:41 PM

Perhaps an ActionListener or SelectionListener. Have you read through the docs?

http://lwuit.java.ne...er/Spinner.html
Was This Post Helpful? 0
  • +
  • -

#10 manpreet_singh  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 03-July 13

Re: I am working on nokia s40 app. I am using spinner component of lwuit

Posted 03 July 2013 - 09:44 PM

yup.. i read these but i am not able to apply them well. button listeners and command listeners are easy but dont know to implement for this
Was This Post Helpful? 0
  • +
  • -

#11 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10369
  • View blog
  • Posts: 38,408
  • Joined: 27-December 08

Re: I am working on nokia s40 app. I am using spinner component of lwuit

Posted 03 July 2013 - 10:06 PM

I'd probably just add a SelectionListener and getValue() on the newSelected index from the SelectionListener's interface method.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1