  We model the evolution of a Jupiter-mass protoplanet formed by the disk
instability mechanism at various radial distances accounting for the presence
of the disk. Using three different disk models, it is found that a newly-formed
Jupiter-mass protoplanet at radial distance of $\lesssim$ 5-10 AU cannot
undergo a dynamical collapse and evolve further to become a gravitational bound
planet. We therefore conclude that {\it giant planets, if formed by the
gravitational instability mechanism, must form and remain at large radial
distances during the first $\sim$ 10$^5-10^6$ years of their evolution}. The
minimum radial distances in which protoplanets of 1 Saturn-mass, 3 and 5
Jupiter-mass protoplanets can evolve using a disk model with $\dot{M}=10^{-6}
M_{Sun}/yr$ and $\alpha=10^{-2}$ are found to be 12, 9, and 7 AU, respectively.
The effect of gas accretion on the planetary evolution of a Jupiter-mass
protoplanet is also investigated. It is shown that gas accretion can shorten
the pre-collapse timescale substantially. Our study suggests that the timescale
of the pre-collapse stage does not only depend on the planetary mass, but is
greatly affected by the presence of the disk and efficient gas accretion.
