Proving $|f(z)|$ is constant on the boundary of a domain implies $f$ is a constant function

Let $D \subset \mathbb{C}$ be a bounded domain and $f$ a function holomorphic in $D$ and continuous in its closure. Suppose that $|f(z)|$ is constant on the boundary of $D$ and that $f$ does not have zeroes in $D$. Prove that $f$ is a constant function.

I think that if I can prove that $f$ attains both its maximum and minimum values on the boundary, then the result follows from the maximum principle. But I've been unable to show this. Is this the right way to approach this problem? If so, how do I show this result? Thanks in advance!

-

Consider $\frac{1}{f(z)}$. $\phantom{}$
Hi Kevin, thanks but could you be more specific? I see $\frac{1}{f(z)}$ is also holomorphic on $D$ and continuous on its closure, and $\left|\frac{1}{f(z)}\right|$ is constant on the boundary of the unit disk, but how does this help with the problem? Sorry I'm missing the point here. –  anegligibleperson Oct 28 '12 at 6:53
@anegligibleperson So $|1/f(z)|$ must have a maximum on the boundary of the disc. –  WimC Oct 28 '12 at 7:45