This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting value of cmbbox

 
Berdy Ahern
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there, I'm trying to get the value of the selected item in my comboxbox but I can't do it. I tried .getText but thats not a method of that class. Any help please?
Thanks
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's funny that you would use precisely these words:

Originally posted by Berdy Ahern:
I'm trying to get the value of the selected item


... because the method you want is "getSelectedItem()".

Please do yourself a favor and bookmark this page. You can look up any class of interest and quickly find a list of all its methods. Take a few minutes and get familiar with how this documentation is laid out. Learning to use it well is important!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic