posted 18 years ago
The notation in the method signature addItemListener(ItemListener I) is a way of saying that the argument I must be of type ItemListener. For line 4 you want to put a reference to/or the actual listener in as the argument. We have lots of options for this, such as
You would use the method signature as given
public void addItemListener(ItemListener I) {
...
}
if you wanted to override it inside a class that extends JMenuItem.