how to draw window?