     //
     //--------------------------------------------------------------------------
 
+    // When changing these constants, make sure you change
+    // the constants with the same name in UIComponent    
+    private static const DEFAULT_MAX_WIDTH:Number = 10000;
+    private static const DEFAULT_MAX_HEIGHT:Number = 10000;
 
     /**
      *  @return Returns the preferred width (untransformed) of the IUIComponent.

        if(!isNaN(obj.explicitMaxHeight))
            maxHeight = obj.explicitMaxHeight;
        else
            maxHeight = Number.MAX_VALUE;

        if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_0)
        {

        if (!isNaN(obj.explicitMaxWidth))
            maxWidth = obj.explicitMaxWidth;
        else
            maxWidth = DEFAULT_MAX_WIDTH;

        if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_0)
        {
