Let U be a connected open set, and its closure. Let f be a continuous function on , analytic and nonconstant on U. If is a maximum point for f, then lies on the boundary of

Now, the book says this comes from a direct application of the global maximum modulus principle, which states:

If U is a connected open set, and f is analytic on U that has a maximum point in U. Then f is constant on U.

I understand the proof of the principle, but how do I apply that to the first statement? Thanks.