It is not recommended to paint with windows closed as it can lead to health concerns from the fumes. Instead, ensure that there is proper ventilation in the room by opening windows and/or using fans.