  Driven by recent RHESSI observations of confined loop-top hard X-ray sources
in solar flares, we consider stochastic acceleration of electrons in the
presence of Coulomb collisions. If electron escape from the acceleration region
can be neglected, the electron distribution function is determined by a balance
between diffusive acceleration and collisions. Such a scenario admits a
stationary solution for the electron distribution function that takes the form
of a kappa distribution. We show that the evolution toward this kappa
distribution involves a "wave front" propagating forwards in velocity space, so
that electrons of higher energy are accelerated later; the acceleration time
scales with energy according to $\tau_{\rm acc} \sim E^{3/2}$. At sufficiently
high energies escape from the finite-length acceleration region will eventually
dominate. For such energies, the electron velocity distribution function is
obtained by solving a time-dependent Fokker-Planck equation in the "leaky-box"
approximation. Solutions are obtained in the limit of a small escape rate from
an acceleration region that can effectively be considered a thick target.
