         if (!lastButtonStyleName)
             lastButtonStyleName = buttonStyleName;
 
+        var button:Button;
         var n:int = numChildren;
-        if (n == 0)
-        {
-            newButton.styleName = buttonStyleName;
-        }
-        else
-        {
-            newButton.styleName = lastButtonStyleName;
-            var cssStyleDeclaration:CSSStyleDeclaration =
-                StyleManager.getStyleDeclaration("." + lastButtonStyleName);
-
-            if (cssStyleDeclaration &&
-                !cssStyleDeclaration.getStyle("focusRoundedCorners"))
-            {
-                newButton.setStyle("focusRoundedCorners", "tr br");
-            }
-
-            // Refresh the skins for the last button that was in this position.
-            var first:Boolean = (n == 1);
-            var lastButton:Button = Button(getChildAt(first ? 0 : n - 1));
-
-            if (first)
-            {
-                lastButton.styleName = firstButtonStyleName;
-                cssStyleDeclaration =
-                    StyleManager.getStyleDeclaration("." + firstButtonStyleName);
-
-                if (cssStyleDeclaration &&
-                    !cssStyleDeclaration.getStyle("focusRoundedCorners"))
-                {
-                    lastButton.setStyle("focusRoundedCorners", "tl bl");
-                }
+        for (var i:int = 0; i < n; i++)
+        {
+            button = Button(getChildAt(i));
+            if (i == 0)
+            {
+                button.styleName = firstButtonStyleName;
+            }
+            else if (i == (n - 1))
+            {
+                button.styleName = lastButtonStyleName;
             }
             else
             {
-                lastButton.styleName = buttonStyleName;
-                cssStyleDeclaration =
-                    StyleManager.getStyleDeclaration("." + buttonStyleName);
-
-                if (cssStyleDeclaration &&
-                    !cssStyleDeclaration.getStyle("focusRoundedCorners"))
-                {
-                    lastButton.setStyle("focusRoundedCorners", "");
-                }
-            }
-
-            lastButton.changeSkins();
-            lastButton.invalidateDisplayList();
-        }
-
-        newButton.label = label;
-        newButton.setStyle("icon", icon);
-
-        newButton.addEventListener(MouseEvent.CLICK, clickHandler);
-
-        addChild(newButton);
-
-        recalcButtonWidths = recalcButtonHeights = true;
-
-        return newButton;
-    }
-
-    /**
-     *  @private
-     */
-    override protected function resetNavItems():void
-    {
+                button.styleName = buttonStyleName;
+            }
+
+            button.changeSkins();
+            button.invalidateDisplayList();
+        }
+
         recalcButtonWidths = recalcButtonHeights = true;
 
         invalidateDisplayList();

            styleProp == firstButtonStyleNameProp ||
            styleProp == lastButtonStyleNameProp)
        {
            var buttonStyleName:String = getStyle(buttonStyleNameProp);
            var firstButtonStyleName:String = getStyle(firstButtonStyleNameProp);
            var lastButtonStyleName:String = getStyle(lastButtonStyleNameProp);
            
            if (!buttonStyleName)
                buttonStyleName = "ButtonBarButton";
            if (!firstButtonStyleName)
                firstButtonStyleName = buttonStyleName;
            if (!lastButtonStyleName)
                lastButtonStyleName = buttonStyleName;
            
            var newStyleName:String;
            
            var n:int = numChildren;
            for (var i:int = 0; i < n; i++)
            {
                if (i == 0)
                    newStyleName = firstButtonStyleName;
                else if (i == (n - 1))
                    newStyleName = lastButtonStyleName;
                else
                    newStyleName = buttonStyleName;
                
                Button(getChildAt(i)).styleName = newStyleName;
            }
            
            recalcButtonWidths = recalcButtonHeights = true;
        }

        if (styleProp == buttonWidthProp)
            recalcButtonWidths = true;
        else if (styleProp == buttonHeightProp)
            recalcButtonHeights = true;
            
    }

    /**

import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.ui.Keyboard;

import mx.containers.BoxDirection;
import mx.controls.buttonBarClasses.ButtonBarButton;
import mx.core.ClassFactory;
