While I was coding, I added the following piece of code:
nameComboBox.valueProperty().addListener(new ChangeListener<NameVO>() {
@Override
public void changed(
ObservableValue<? extends NameVO> observable,
NameVO oldValue, NameVO newValue) {
// TODO Auto-generated method stub
}
});
And the Eclipse is showing me Red line under addListener
and moving mouse over that I could see the following message:
The method addListener(ChangeListener<? super capture#6-of ?>) in the type ObservableValue<capture#6-of ?> is not applicable for the arguments (new ChangeListener<NameVO>(){})
Why would this be because of?
[Note: I have done similar thing for remaining ComboBoxes, but I am getting no such message over there]