Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
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
It is sorta covered in the JavaRanch Style Guide.
subject: addItemListener error message
Similar Threads
Frame Attack!
for Applet
What kind of error is this?
CheckboxGroup in Dialog
To many Frames