The nonlinear evolution of the "Parker" instability in accretion disks and galactic gas disks is studied by using a two-dimensional magnetohydrodynamic (MHD) code. The gas layer is assumed to be located at some distance from a point mass which is the origin of gravity. The magnetic fields are assumed to be parallel to the disk plane in magnetostatic equilibrium. The sound and Alfvén speeds are taken to be spatially uniform in the initial state. The most unstable mode (λx = λmax) as well as other modes (λx ≠ λmax) are examined in detail. It is found that nonlinear stages of the instability are generally classified into two cases: nonlinear oscillation and shock wave formation. The former occurs for short-wavelength modes, λx < λc, while the latter arises for long-wavelength modes, λx > λc. Here λc ≃ (3.5β + 6)H (> λmax for β > 3), where H is the half-thickness of the disk and β is the ratio of gas pressure to magnetic pressure. The period of the nonlinear oscillation is ∼H/Vz, where Vz(≃0.1VA) is the vertical velocity of the magnetic loop in the nonlinear stage. In high-β (>3) disks, the wavelength of the nonlinear oscillation increases with time owing to the nonlinear coupling. When λx becomes comparable to λc (>λmax), shock waves are formed and nonlinear oscillations are damped. In low-β (<3) disks, shock waves appear when λx ∼ λmax, and the system evolves into a quasi-static state. Thus the length of magnetic loops in final equilibrium is roughly max (λc, λmax). Applications to magnetic loops in accretion disks and in galactic disks are briefly discussed.