made AddXYWindow to receive the object where the content should be added