In this study, we investigate a new simple scheme using a planar undulator (PU) together with a properly dispersed electron beam ($e$ beam) with a large energy spread (${\sim}1\%$) to enhance the free-electron laser (FEL) gain. For a dispersed $e$ beam in a PU, the resonant condition is satisfied for the center electrons, while the frequency detuning increases for the off-center electrons, inhibiting the growth of the radiation. The PU can act as a filter for selecting the electrons near the beam center to achieve the radiation. Although only the center electrons contribute, the radiation can be enhanced significantly owing to the high-peak current of the beam. Theoretical analysis and simulation results indicate that this method can be used for the improvement of the radiation performance, which has great significance for short-wavelength FEL applications.