my dog learned polymorphism
The moose likes Java in General and the fly likes addItemListener error message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "addItemListener error message" Watch "addItemListener error message" New topic

addItemListener error message

Dan Nissen

Joined: Jun 06, 2002
Posts: 14
Hi All - I keep getting this error when I try to use addItemListener on a Choice or JComboBox. Can anyone please suggest to me why I recieve this error?
C:\Program Files\Xinox Software\JCreator Pro\MyProjects\DealerNet\ addItemListener(java.awt.event.ItemListener) in java.awt.Choice cannot be applied to (DealerNet)
The Full code can be found at Code.
David G Risner
Ranch Hand

Joined: May 02, 2002
Posts: 30
It is because your class is not an ItemListener. Either your class needs to implement the ItemListener interface or you need to create an inner class that implements ItemListener and have it take care of whatever tasks are needed.

David G. Risner<br />Software Engineer<br />California State University, Los Angeles
I agree. Here's the link:
subject: addItemListener error message
It's not a secret anymore!