Take a thin ruler. Lay it on edge along the center of the stem, being sure that the ruler's ends extend beyond the front and back of the stem. Turn the front wheel about 45 degrees. Now, be sure the ruler is lined up with the center of the handlebar clamp and the stem clamp. Close one eye; the ruler should appear to line up perfectly with the center of the tire in front of the stem and the tire behind the stem.
Complicated to explain; easy to do.