The Schrödinger equation for two particles of the same mass in two- and three-dimensional parabolic quantum dots is analyzed by using the trigonometric sweep method. Novel curves which show quantum-size effects on the two-particle energy spectra and take into consideration the repulsive and attractive interaction as particular cases of the same phenomenom are presented. The level-ordering and crossovers of these curves for 2D and 3D exciton and two-electron in a spherical quantum dot are analyzed and discussed. Our results for the 2D two-electron problem are in good agreement with the ones obtained previously by using other methods.