The effect of color screening on the formation of a heavy quark-antiquark (QQ) bound statesuch as the J/ψ meson-is studied using a constituent-quark model. The response of the nuclear medium to the addition of two color charges is simulated directly in terms of its quark constituents via a string-flip potential that allows for quark confinement within hadrons yet enables the hadrons to separate without generating unphysical long-range forces. Medium modifications to the properties of the heavy meson, such as its energy and its mean-square radius, are extracted by solving Schrödinger's equation for the QQ pair in the presence of a (screened) density-dependent potential. The density dependence of the heavy-quark potential is in qualitative agreement with earlier studies of its temperature dependence extracted from lattice calculations at finite temperature. In the present model it is confirmed that abrupt changes in the properties of the J/ψ-meson in the hadronic medium (plasma), correlate strongly with the deconfining phase transition.