We simulate surface field patterns for cool dwarf stars of widely different levels of activity and estimate the associated global coronal radiative losses. We find that the integrated X-ray brightness of coronae of cool stars is relatively insensitive to the patterns of their surface magnetic fields, and that the X-ray flux is determined almost entirely by the magnetic flux through the stellar surfaces. This reconciles potentially inconsistent findings in the literature for the heating of solar and stellar coronae: solar studies suggested that the heating flux density entering coronal loops scales as FH=∊0Bβ/Lλ (for a magnetic flux density B at the base of a loop of length L, with β=1.0+/-0.3 and λ=1.0+/-0.5), whereas combined solar and stellar data suggested that the X-ray flux density FX from entire cool-star coronae depends only on the average magnetic flux density <|ϕ|> through the stellar photospheres. We find that the above two scalings are compatible because loop lengths and base magnetic flux densities are essentially uncorrelated for the global coronal loop ensemble and because the average loop lengths differ much less from star to star for Sun-like stars of different activity than the average base field strengths. We also explore the scaling properties of the constant of proportionality ∊0 for stars of significantly different surface gravity.