Illustrator

I’m trying to teach myself Illustrator and i want to use a gradient for something, but i can’t seem to manage to get any other colour than the standard black to white gradient.

It would seem to me to be as simple as clicking the wee colour boxes underneath the gradient bar like in Photoshop, but they dont work?!

Is this how you do it? i would have thought it would have been relatively simple!!