4 Kas 2011 ... Alternatively, cast to Window . Both work. This seems to be the intended design. Do this rather than defining your own class.