943,815 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Marked Solved
  • Views: 3305
  • Java RSS
Sep 22nd, 2009
0

Combobox Event listener?

Expand Post »
I want to trigger an event when ever an item is changed in a combo box...how can i do it?

what is the listener & action?

thnkx in advance.....
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster
jrosh is offline Offline
140 posts
since Sep 2009
Sep 22nd, 2009
0

Re: Combobox Event listener?

Featured Poster
Reputation Points: 1924
Solved Threads: 951
Posting Expert
JamesCherrill is online now Online
5,775 posts
since Apr 2008
Sep 22nd, 2009
0

Re: Combobox Event listener?

You need to add ItemListener to your combo-box. The sun tutorial is brilliant, look here :

http://http://java.sun.com/docs/book.../combobox.html

I hope that helps!

EDIT: lol James Cherrill, you just beat me to it! Same tutorial as well, great minds...
Last edited by majestic0110; Sep 22nd, 2009 at 8:27 am.
Reputation Points: 256
Solved Threads: 72
Nearly a Posting Virtuoso
majestic0110 is offline Offline
1,306 posts
since Oct 2007
Sep 22nd, 2009
1

Re: Combobox Event listener?

You need to add ItemListener to your combo-box. The sun tutorial is brilliant, look here :

http://http://java.sun.com/docs/book.../combobox.html

I hope that helps!

EDIT: lol James Cherrill, you just beat me to it! Same tutorial as well, great minds...
Your link doesn't work, you have an extra http://

Here is a working version of your link
Featured Poster
Reputation Points: 533
Solved Threads: 53
Senior Poster
jasimp is offline Offline
3,593 posts
since Aug 2007
Sep 22nd, 2009
0

Re: Combobox Event listener?

lol thanks for that Jasimp, silly me!
Reputation Points: 256
Solved Threads: 72
Nearly a Posting Virtuoso
majestic0110 is offline Offline
1,306 posts
since Oct 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: threading
Next Thread in Java Forum Timeline: array of structs





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC