Two-dimensional, weakly nonlinear, weakly dispersive, weakly damped gravitywaves are excited in a rectangular tank by an oscillatory translation at a frequency that approximates that of the dominant mode. A Lagrangian formulation, in which the generalized coordinates are the coefficients in a normal-mode expansion of the free-surface displacement and are slowly modulated sinusoids, leads to a set of evolution equations for 2 N slowly varying amplitudes, where N is the number of modes retained in the truncated modal expansion. The asymptotic solutions of these evolution equations may be fixed points (harmonic wave motion), limit cycles (periodic exchange of energy between the modes), or chaotic for N = 2, but only fixed-point solutions (which correspond to the steady-state solutions obtained originally by Chester) are obtained for N = 4 and 8. This suggests that the limit cycles and chaotic solutions for N = 2 are artifacts of the truncation. An alternative formulation, based on the superposition of oppositely moving solutions of a forced Korteweg-de Vries equation, is given in an appendix.