I prepainted all of mine. then applied another coat after I installed them. Obviously easier to paint on the ground than on a ladder. You will still have to paint the framed opening, but you won't have to worry about cutting in close to the glass.
BTW one of mine is in a bathroom and after five years have had no mildew.
Frank