How to... paint a door
Every time you paint where an edge meets the front or back of the door (depending on which side you’re doing), run a cloth or your fingers along it to make sure that a ridge of paint doesn’t form where you can’t see.
This will ensure that you get a good finish and won’t have problems refitting the door because of ridges of paint.