diff --git a/src/share/classes/javax/swing/plaf/nimbus/NimbusIcon.java b/src/share/classes/javax/swing/plaf/nimbus/NimbusIcon.java index 921ca0ea74c385aade8f5ec7dcd1da08d6cbb437..f96a03c90454e1808951d7c44ea3ba6ece5f7554 100644 --- a/src/share/classes/javax/swing/plaf/nimbus/NimbusIcon.java +++ b/src/share/classes/javax/swing/plaf/nimbus/NimbusIcon.java @@ -84,6 +84,8 @@ class NimbusIcon extends SynthIcon { translatex = 1; } } + } else if (c instanceof JMenu) { + flip = ! c.getComponentOrientation().isLeftToRight(); } if (g instanceof Graphics2D){ Graphics2D gfx = (Graphics2D)g; diff --git a/src/share/classes/sun/swing/MenuItemLayoutHelper.java b/src/share/classes/sun/swing/MenuItemLayoutHelper.java index 109d0c4022c5a814309d3dc097d27acfc429832d..1f0281e9be3a1ba34f8b27c18ebec3fca9fba2e1 100644 --- a/src/share/classes/sun/swing/MenuItemLayoutHelper.java +++ b/src/share/classes/sun/swing/MenuItemLayoutHelper.java @@ -718,10 +718,10 @@ public class MenuItemLayoutHelper { } private void alignRect(Rectangle rect, int alignment, int origWidth) { - if (alignment != SwingUtilities.LEFT) { + if (alignment == SwingConstants.RIGHT) { rect.x = rect.x + rect.width - origWidth; - rect.width = origWidth; } + rect.width = origWidth; } protected void layoutIconAndTextInLabelRect(LayoutResult lr) {