Painting neatly is always a challenge, especially when painting around glass, such as window frames or glass paneled cabinet doors.
While you could apply masking tape around the edges of the glass, tape can be hard to position properly and remove. A better solution is to line the edges of the glass with strips of ordinary printer paper. Start by cutting paper to approximately 1” wide strips, making sure that the edges are straight. A paper cutter or straight edge and utility knife work great for this. Cut the paper to the length needed for a good fit around the glass.
Wet the paper in a pan of water so it will adhere to the glass.
Take a strip of paper out of the water, and run it through your fingers to remove any excess.
Position each strip on the glass around the frame, using only the adhesion provided by the water to hold it in place.
Once the strips are arranged, use a dry paintbrush to smooth them out.
After painting, simply peel off the paper from the glass.