Quantum confinement in few-electron systems