Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Posting combo box to textarea.  RSS feed

 
alexiel davis
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually I am hoping that someone can give me a example on how to pass value from combo box to textarea. I have done one..but it doesn't works.


 
Michal Bienek
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to add an ItemListener, not an ActionListener to obtain combo box selection events. You'll need to implement an itemStateChanged(ItemEvent e) method in which you can retrieve the selected combo box value via e.getItem(), and then populate your text area with that.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!