We study the thermodynamics of Bose-Einstein condensation in a weakly interacting quasihomogeneous atomic gas, prepared in an optical-box trap. We characterize the critical point for condensation and observe saturation of the thermal component in a partially condensed cloud, in agreement with Einstein's textbook picture of a purely statistical phase transition. Finally, we observe the quantum Joule-Thomson effect, namely isoenthalpic cooling of an (essentially) ideal gas. In our experiments this cooling occurs spontaneously, due to energy-independent collisions with the background gas in the vacuum chamber. We extract a Joule-Thomson coefficient μJT>10(9) K/bar, about 10 orders of magnitude larger than observed in classical gases.