 		
         role = AccConst.ROLE_SYSTEM_PANE;
         
-		TitleWindow(master).titleDisplay.addEventListener(MouseEvent.MOUSE_UP,
-													 eventHandler);
-		
-		TitleWindow(master).closeButton.addEventListener(MouseEvent.MOUSE_UP,
-												   eventHandler);
+		// TitleWindow has a titleDisplay and a closeButton as skin parts,
+		// and we need to listen to some of their events.
+		// They may or may not be present when this constructor is called.
+		// If they come or go later, we are notified via
+		// "partAdded" and "partRemoved" events.
+		
+		var titleDisplay:TextBase = TitleWindow(master).titleDisplay;
+		if (titleDisplay)
+			titleDisplay.addEventListener(MouseEvent.MOUSE_UP, eventHandler);		
+		
+		var closeButton:Button = TitleWindow(master).closeButton;
+		if (closeButton)
+			closeButton.addEventListener(MouseEvent.MOUSE_UP, eventHandler);
+	}
+	
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden properties: AccImpl
+	//
+	//--------------------------------------------------------------------------
+	
+	//----------------------------------
+	//  eventsToHandle
+	//----------------------------------
+	
+	/**
+	 *  @private
+	 *  Array of events that we should listen for from the master component.
+	 */
+	override protected function get eventsToHandle():Array
+	{
+		return super.eventsToHandle.concat([ SkinPartEvent.PART_ADDED,
+											 SkinPartEvent.PART_REMOVED ]);
 	}
 	
 	//--------------------------------------------------------------------------

import flash.accessibility.Accessibility;
import flash.events.Event;
import flash.events.MouseEvent;
import spark.components.Panel;
import spark.components.TitleWindow;
import mx.accessibility.AccConst;
import mx.core.UIComponent;
import mx.core.mx_internal;

use namespace mx_internal;


	/**
	 *  @private
	 *  Creates a TitleWindow's AccessibilityImplementation object.
	 *  This method is called from TitleWindow's
	 *  partAdded() method, not its initializeAccessibility() method,
	 *  because the TitleWindowAccImpl needs to be attached
	 *  to the TitleWindow's titleBar.
	 *  The partRemoved() method removes the acc impl from the titleDisplay.
	 */
	mx_internal static function createAccessibilityImplementation(
								component:UIComponent):void
