jComponent.addInternalFrameListener(new WindowEventDispatcher());
this.eventDispatcher = new WindowEventDispatcher(); jComponent.addInternalFrameListener(eventDispatcher);
    public SwingBaseWindowPeer(SwingToolkit toolkit, awtT window,            peerT jComponent) {        super(toolkit, window, jComponent);        jComponent.addInternalFrameListener(new WindowEventDispatcher());    }