The behavior of a cavitation bubble adjacent to a rigid wall is studied numerically with the boundary integral method described in Zhang, Duncan, and Chahine [J. Fluid Mech. 257, 147 (1993)]. In the previous work, the pressure inside the bubble was held constant (this is referred to herein as the empty bubble case). In the present calculations, an internal gas pressure, which is a function of the bubble volume, is included in the model. The present results are qualitatively similar to those in the empty bubble case in several ways: a wall-directed reentrant jet is formed in the later phase of the collapse; this jet impacts with the side of the bubble closest to the wall creating a toroidal-shaped bubble; and a shear layer develops along the impact interface. However, unlike the empty bubble, whose volume decreases monotonically to zero at the end of the collapse, the present gas-filled bubble reaches a minimum volume and then, due to its high internal gas pressure, begins to grow again (rebound). In the empty bubble case, the hydrodynamic pressure on the wall rises rapidly at the end of the calculation making it impossible to compute the maximum value of the pressure. In the present calculations, the pressure on the wall is found to reach a maximum value when the bubble starts to rebound. This timing of the pressure peak is in agreement with the experimental data of Tomita and Shima [J. Fluid Mech. 169, 535 (1986)] and Kimoto [International Symposium on Cavitation Research Facilities and Techniques (American Society of Mechanical Engineers, New York, 1987), Vol. 57, pp. 535-564], as are the orders of magnitude of the maximum pressures. Direct comparison with the numerical results of Best [J. Fluid Mech. 251, 79 (1993)] are also presented. Large differences in bubble shapes and flow fields are found.