             tmp.x = x;
             tmp.y = y;
             nativeWindow.bounds = tmp;
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: SkinnableContainer
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     *  @private
+     */
+    override protected function partAdded(partName:String, instance:Object):void
+    {
+        super.partAdded(partName, instance);
+        
+        if (instance == statusBar)
+        {
+            statusBar.visible = _showStatusBar;
+            statusBar.includeInLayout = _showStatusBar;
+            showStatusBarChanged = false;
+        }
+        else if (instance == titleBar)
+        {
+            if (!nativeWindow.closed)
+            {
+                // If the initial title is the default and the native window is set
+                // from the initial window settings, 
+                // then use the initial window settings title.
+                if (_title == "" && systemManager.stage.nativeWindow.title != null)
+                    _title = systemManager.stage.nativeWindow.title;
+                else
+                    systemManager.stage.nativeWindow.title = _title;                
+            }
+
+            titleBar.title = _title;
+            titleChanged = false;
+        }
+        else if (instance == statusText)
+        {
+            statusText.text = status;
+            statusChanged = false;    
+        }
+        else if (instance == gripper)
+        {
+            gripper.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
+        }
+    }
+    
+    /**
+     *  @private
+     */
+    override protected function partRemoved(partName:String, instance:Object):void
+    {
+        super.partRemoved(partName, instance);
+        
+        if (instance == gripper)
+        {
+            gripper.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
         }
     }
 

    
    //--------------------------------------------------------------------------
    //
    //  Overridden methods: SkinnableContainer
    //
    //--------------------------------------------------------------------------
    
    /**
     *  @private
     */
    override protected function partAdded(partName:String, instance:Object):void
    {
        super.partAdded(partName, instance);
        
        if (instance == statusBar)
        {
            statusBar.visible = _showStatusBar;
            statusBar.includeInLayout = _showStatusBar;
            showStatusBarChanged = false;
        }
        else if (instance == titleBar)
        {
            if (!nativeWindow.closed)
            {
                // If the initial title is the default and the native window is set
                // from the initial window settings, 
                // then use the initial window settings title.
                if (_title == "" && systemManager.stage.nativeWindow.title != null)
                    _title = systemManager.stage.nativeWindow.title;
                else
                    systemManager.stage.nativeWindow.title = _title;                
            }

            titleBar.title = _title;
            titleChanged = false;
        }
        else if (instance == statusText)
        {
            statusText.text = status;
            statusChanged = false;    
        }
        else if (instance == gripper)
        {
            gripper.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
        }
    }
    
    /**
     *  @private
     */
    override protected function partRemoved(partName:String, instance:Object):void
    {
        super.partRemoved(partName, instance);
        
        if (instance == gripper)
        {
            gripper.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
        }
    }

    //--------------------------------------------------------------------------
    //
    //  Overridden methods: UIComponent
    //
    //--------------------------------------------------------------------------

    /**
     *  @private

//--------------------------------------
//  Other metadata
//--------------------------------------

[AccessibilityClass(implementation="spark.accessibility.WindowAccImpl")]

/**
 *  The frameworks must be initialized by WindowedSystemManager.
