The override annotation was added to stateChanged().