We build confidence balls for the common density s of a real valued sample X1,...,Xn. We use resampling methods to estimate the projection of s onto finite dimensional linear spaces and a model selection procedure to choose an optimal approximation space. The covering property is ensured for all n ≥ 2 and the balls are adaptive over a collection of linear spaces.