Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

addItemListener error message

 
Dan Nissen
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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\DealerNet.java:1149: addItemListener(java.awt.event.ItemListener) in java.awt.Choice cannot be applied to (DealerNet)
DAppCreditEmpStatus.addItemListener(this);
The Full code can be found at Code.
Thanks
Dan
 
David G Risner
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic