Redesign SubWindow event onOpen and onClose, move from its delegate to the Window class.