Combobox Event listener?

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Sep 2009
Posts: 108
Reputation: jrosh is an unknown quantity at this point 
Solved Threads: 0
jrosh jrosh is offline Offline
Junior Poster

Combobox Event listener?

 
0
  #1
Sep 22nd, 2009
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.....
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 1,030
Reputation: JamesCherrill is just really nice JamesCherrill is just really nice JamesCherrill is just really nice JamesCherrill is just really nice JamesCherrill is just really nice 
Solved Threads: 153
JamesCherrill JamesCherrill is online now Online
Veteran Poster

Re: Combobox Event listener?

 
0
  #2
Sep 22nd, 2009
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 1,297
Reputation: majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about 
Solved Threads: 68
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Nearly a Posting Virtuoso

Re: Combobox Event listener?

 
0
  #3
Sep 22nd, 2009
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.
Computers are man's attempt at designing a cat: It does whatever it wants, whenever it wants, and rarely ever at the right time.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 3,584
Reputation: jasimp has a spectacular aura about jasimp has a spectacular aura about jasimp has a spectacular aura about 
Solved Threads: 52
Featured Poster
jasimp's Avatar
jasimp jasimp is offline Offline
Senior Poster

Re: Combobox Event listener?

 
1
  #4
Sep 22nd, 2009
Originally Posted by majestic0110 View Post
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
"Argyou not with the hand you are dealt in cards or life." ---- Wizard and Glass
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 1,297
Reputation: majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about 
Solved Threads: 68
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Nearly a Posting Virtuoso

Re: Combobox Event listener?

 
0
  #5
Sep 22nd, 2009
lol thanks for that Jasimp, silly me!
Computers are man's attempt at designing a cat: It does whatever it wants, whenever it wants, and rarely ever at the right time.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 439 | Replies: 4
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC