You can apply the paint for the top text before carving. If you don't want paint on the frame, mask it off. After carving, apply Varathane or other finish to the whole thing, and then paint the text as desired. The Varathane will prevent bleeding when you paint, as well as making it easy to wipe off what you don't want, as was mentioned by rgerding.
Good judgement comes from experience.
Experience comes from bad judgement.