Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem on spinner

swarna latha
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

In our code,first the spinner should be empty.when we click on spinner up arrow or down arrow then only that should show current date.

I have written following code with that ,if i open the screen that is showing the current date with that format.

Date d= new Date();
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
SpinnerDateModel model=new SpinnerDateModel(d,null, null, 0);
JSpinner s1 = new JSpinner(model);
JSpinner.DateEditor de = new JSpinner.DateEditor(s1, sdf.toPattern());

with the above code i am not able to get empty spinner at first time
so i have written like that to get empty spinner

If i written that line i am getting empty spinner.Next if i click spinner arrows i should get current date .But i am not able to get.

Please if any one know about this.
please help me to how can i get use action for that.
I have taken changelistener also its not be help ful for me.

Thanks and Regards
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic