Created window drawing loop in Application

Created window drawing loop in Application