  We point out that a sector required to set the cosmological constant to zero
in gauge-mediated supersymmetry-breaking models naturally produces a
supersymmetry-invariant mass ($\mu$ term) for Higgs doublets of the order of
the electroweak scale. Since this new sector preserves the supersymmetry, it
does not generate supersymmetry-breaking masses for the Higgs doublets and thus
the $\mu$ problem is solved.
