diff -r dff0ccda7d95 javafx-sg-prism/src/com/sun/javafx/sg/prism/NGRegion.java
--- a/javafx-sg-prism/src/com/sun/javafx/sg/prism/NGRegion.java	Wed Dec 05 10:35:00 2012 -0800
+++ b/javafx-sg-prism/src/com/sun/javafx/sg/prism/NGRegion.java	Thu Dec 06 10:55:19 2012 -0800
@@ -562,7 +562,7 @@
                     // Get the BorderStroke. When stroking a shape, we only honor the
                     // topStroke, topStyle, widths.top, and insets.
                     final BorderStroke stroke = strokes.get(i);
-                    setBorderStyle(g, stroke);
+                    setBorderStyle(g, stroke, -1); // we're stroking a path, so it is hopeless
                     final Insets insets = stroke.getInsets();
                     g.draw(resizeShape((float) insets.getTop(), (float) insets.getRight(),
                                        (float) insets.getBottom(), (float) insets.getLeft()));
@@ -898,6 +898,22 @@
                     final float r = rightInset +
                             (rightType == StrokeType.OUTSIDE ? -rightWidth / 2 :
                              rightType == StrokeType.INSIDE ? rightWidth / 2 : 0);
+
+                    // The length of each side of the path we're going to stroke
+                    final double topLength = (width - radii.getTopLeftHorizontalRadius() - radii.getTopRightHorizontalRadius()) +
+                            (Math.PI * radii.getTopLeftHorizontalRadius() / 4) +
+                            (Math.PI * radii.getTopRightHorizontalRadius() / 4);
+                    final double rightLength = (height - radii.getTopRightVerticalRadius() - radii.getBottomRightVerticalRadius()) +
+                            (Math.PI * radii.getTopRightVerticalRadius() / 4) +
+                            (Math.PI * radii.getBottomRightVerticalRadius() / 4);
+                    final double bottomLength = (width - radii.getBottomLeftHorizontalRadius() - radii.getBottomRightHorizontalRadius()) +
+                            (Math.PI * radii.getBottomLeftHorizontalRadius() / 4) +
+                            (Math.PI * radii.getBottomRightHorizontalRadius() / 4);
+                    final double leftLength = (height - radii.getTopLeftVerticalRadius() - radii.getBottomLeftVerticalRadius()) +
+                            (Math.PI * radii.getTopLeftVerticalRadius() / 4) +
+                            (Math.PI * radii.getBottomLeftVerticalRadius() / 4);
+
+
                     // If the radii are uniform, then reading any one value is sufficient to
                     // know what the radius is for all values
                     final float radius = (float) radii.getTopLeftHorizontalRadius();
@@ -907,7 +923,7 @@
                         float w = width - l - r;
                         float h = height - t - b;
                         if (w >= 0 && h >= 0) {
-                            setBorderStyle(g, stroke);
+                            setBorderStyle(g, stroke, topLength + rightLength + bottomLength + leftLength);
                             if (radii.isUniform() && radius == 0) {
                                 // We're just drawing a squared stroke on all four sides of the same style
                                 // and width and color, so a simple drawRect call is all that is needed.
@@ -941,7 +957,7 @@
                             if (BorderStrokeStyle.SOLID == topStyle) {
                                 g.fillRect(leftInset, topInset, width - leftInset - rightInset, topWidth);
                             } else {
-                                g.setStroke(createStroke(topStyle, topWidth));
+                                g.setStroke(createStroke(topStyle, topWidth, topLength));
                                 g.drawLine(l, t, width - r, t);
                             }
                         }
@@ -952,7 +968,7 @@
                                 g.fillRect(width - rightInset - rightWidth, topInset,
                                            rightWidth, height - topInset - bottomInset);
                             } else {
-                                g.setStroke(createStroke(rightStyle, rightWidth));
+                                g.setStroke(createStroke(rightStyle, rightWidth, rightLength));
                                 g.drawLine(width - r, topInset, width - r, height - bottomInset);
                             }
                         }
@@ -963,7 +979,7 @@
                                 g.fillRect(leftInset, height - bottomInset - bottomWidth,
                                         width - leftInset - rightInset, bottomWidth);
                             } else {
-                                g.setStroke(createStroke(bottomStyle, bottomWidth));
+                                g.setStroke(createStroke(bottomStyle, bottomWidth, bottomLength));
                                 g.drawLine(l, height - b, width - r, height - b);
                             }
                         }
@@ -973,7 +989,7 @@
                             if (BorderStrokeStyle.SOLID == leftStyle) {
                                 g.fillRect(leftInset, topInset, leftWidth, height - topInset - bottomInset);
                             } else {
-                                g.setStroke(createStroke(leftStyle, leftWidth));
+                                g.setStroke(createStroke(leftStyle, leftWidth, leftLength));
                                 g.drawLine(l, topInset, l, height - bottomInset);
                             }
                         }
@@ -984,22 +1000,22 @@
                         // stroke into a path (or in the current implementation, an array of paths).
                         Shape[] paths = createPaths(t, l, b, r, radii);
                         if (topStyle != BorderStrokeStyle.NONE) {
-                            g.setStroke(createStroke(topStyle, topWidth));
+                            g.setStroke(createStroke(topStyle, topWidth, topLength));
                             g.setPaint((Paint) topStroke.impl_getPlatformPaint());
                             g.draw(paths[0]);
                         }
                         if (rightStyle != BorderStrokeStyle.NONE) {
-                            g.setStroke(createStroke(rightStyle, rightWidth));
+                            g.setStroke(createStroke(rightStyle, rightWidth, rightLength));
                             g.setPaint((Paint) rightStroke.impl_getPlatformPaint());
                             g.draw(paths[1]);
                         }
                         if (bottomStyle != BorderStrokeStyle.NONE) {
-                            g.setStroke(createStroke(bottomStyle, bottomWidth));
+                            g.setStroke(createStroke(bottomStyle, bottomWidth, bottomLength));
                             g.setPaint((Paint) bottomStroke.impl_getPlatformPaint());
                             g.draw(paths[2]);
                         }
                         if (leftStyle != BorderStrokeStyle.NONE) {
-                            g.setStroke(createStroke(leftStyle, leftWidth));
+                            g.setStroke(createStroke(leftStyle, leftWidth, leftLength));
                             g.setPaint((Paint) leftStroke.impl_getPlatformPaint());
                             g.draw(paths[3]);
                         }
@@ -1127,7 +1143,16 @@
         return (d - (int)d) == 0 ? (int) d : (int) (d + 1);
     }
 
-    private BasicStroke createStroke(BorderStrokeStyle sb, double strokeWidth) {
+    /**
+     * Creates a Prism BasicStroke based on the stroke style, width, and line length.
+     *
+     * @param sb             The BorderStrokeStyle
+     * @param strokeWidth    The width of the stroke we're going to draw
+     * @param lineLength     The total linear length of this stroke. This is needed for
+     *                       handling "dashed" and "dotted" cases, otherwise, it is ignored.
+     * @return A prism BasicStroke
+     */
+    private BasicStroke createStroke(BorderStrokeStyle sb, double strokeWidth, double lineLength) {
         int cap;
         if (sb.getLineCap() == StrokeLineCap.BUTT) {
             cap = BasicStroke.CAP_BUTT;
@@ -1159,15 +1184,43 @@
             throw new AssertionError("Should never have been asked to draw a border with NONE");
         } else if (sb.getDashArray().size() > 0) {
             List<Double> dashArray = sb.getDashArray();
-            double[] array = new double[dashArray.size()];
-            double multiplier = dashArray == BorderStrokeStyle.DASHED.getDashArray() ||
-                    dashArray == BorderStrokeStyle.DOTTED.getDashArray() ? strokeWidth : 1;
-            for (int i=0; i<array.length; i++) {
-                array[i] = dashArray.get(i) * multiplier;
+            double[] array;
+            float dashOffset;
+            if (lineLength > 0 && dashArray == BorderStrokeStyle.DOTTED.getDashArray()) {
+                // For DOTTED we want the dash array to be 0, val, where the "val" is as close to strokewidth*2 as
+                // possible, but we want the spacing to be such that we get an even spacing between all dots around
+                // the edge.
+                double remainder = lineLength % (strokeWidth * 2);
+                double numSpaces = lineLength / (strokeWidth * 2);
+                double spaceWidth = (strokeWidth * 2) + (remainder / numSpaces);
+                array = new double[] {0, spaceWidth};
+                dashOffset = 0;
+            } else if (lineLength > 0 && dashArray == BorderStrokeStyle.DASHED.getDashArray()) {
+                // For DASHED we want the dash array to be 2*strokewidth, val where "val" is as close to
+                // 1.4*strokewidth as possible, but we want the sapcing to be such that we get an even spacing between
+                // all dashes around the edge. Maybe we can start with the dash phase at half the dash length.
+                final double dashLength = strokeWidth * 2;
+                double gapLength = strokeWidth * 1.4;
+                final double segmentLength = dashLength + gapLength;
+                final double divided = lineLength / segmentLength;
+                final double numSegments = (int) divided;
+                final double dashCumulative = numSegments * dashLength;
+                gapLength = (lineLength - dashCumulative) / numSegments;
+                array = new double[] {dashLength, gapLength};
+                dashOffset = (float) (dashLength*.6);
+            } else {
+                // If we are not DASHED or DOTTED or we're stroking a path and not a basic rounded rectangle
+                // so we just take what we've been given.
+                array = new double[dashArray.size()];
+                for (int i=0; i<array.length; i++) {
+                    array[i] = dashArray.get(i);
+                }
+                dashOffset = (float) sb.getDashOffset();
             }
+
             bs = new BasicStroke((float) strokeWidth, cap, join,
                     (float) sb.getMiterLimit(),
-                    array, (float) sb.getDashOffset());
+                    array, dashOffset);
         } else {
             bs = new BasicStroke((float) strokeWidth, cap, join,
                     (float) sb.getMiterLimit());
@@ -1176,7 +1229,7 @@
         return bs;
     }
 
-    private void setBorderStyle(Graphics g, BorderStroke sb) {
+    private void setBorderStyle(Graphics g, BorderStroke sb, double length) {
         // Any one of, or all of, the sides could be 'none'.
         // Take the first side that isn't.
         final BorderWidths widths = sb.getWidths();
@@ -1201,7 +1254,7 @@
         if (bs == null || bs == BorderStrokeStyle.NONE) {
             return;
         }
-        g.setStroke(createStroke(bs, sbWidth));
+        g.setStroke(createStroke(bs, sbWidth, length));
         g.setPaint((Paint) sbFill);
     }
 
