Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sun Java Studio Creator : dropdown value ..

 
Naveen Mishra
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
this is my day 1 with Sun Java Stdio Creator.

I've a dropdown filled with data , a textfield and a button .
as soon as i click on button I get the index of the list item selected.
i need value ( displayed text indeed).

my code is ...
////


public String button1_action() {
// User event code here...
textField1.setValue("Hello , "+ dropdown1.getValue());

return null;
}
////
any change in the code ???

Thanks .
 
Darrin Smith
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Naveen Mishra:
Hi.
this is my day 1 with Sun Java Stdio Creator.

I've a dropdown filled with data , a textfield and a button .
as soon as i click on button I get the index of the list item selected.
i need value ( displayed text indeed).

my code is ...
////


public String button1_action() {
// User event code here...
textField1.setValue("Hello , "+ dropdown1.getValue());

return null;
}
////
any change in the code ???

Thanks .



You should probably post that question here: http://swforum.sun.com/jive/forum.jspa?forumID=123&start=0
 
Naveen Mishra
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Darrin for ur valuable suggestion.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic