Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6840112

NimbusLAF JMenu

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 6u10
    • client-libs

      FULL PRODUCT VERSION :
      java version "1.6.0_12"
      Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
      Java HotSpot(TM) Client VM (build 11.2-b01, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP

      A DESCRIPTION OF THE PROBLEM :
      If a JMenu with ComponentOrientation.RIGHT_TO_LEFT is put in another JMenu then the arrow symbol which then appears on the left should point left and not right as it does currently.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      JMenu's in Ocean and Metal have Arrows which point LEFT when ComponentOrientation is set to RIGHT_TO_LEFT.

      ACTUAL -
      JMenu's in Nimbus have Arrows which point RIGHT when ComponentOrientation is set to RIGHT_TO_LEFT.


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javax.swing.*;
      import java.awt.*;

      public class JMenuTest extends JFrame
      {
         public JMenuTest()
         {
            JMenu helpMenu = new JMenu("Help");
            helpMenu.applyComponentOrientation( ComponentOrientation.RIGHT_TO_LEFT );

            JMenu subMenu = new JMenu("The Arrow");
            subMenu.applyComponentOrientation( ComponentOrientation.RIGHT_TO_LEFT );
            subMenu.add( new JMenuItem( "Should point LEFT !?" ));
            helpMenu.add( subMenu );

            JMenuBar mBar = new JMenuBar();
      mBar.add( Box.createHorizontalGlue() );
            mBar.add( helpMenu );
            setJMenuBar( mBar );

      setDefaultCloseOperation( EXIT_ON_CLOSE );
            setSize( 300,240 );
            setVisible( true );
         }

         public static void main( String[] args )
         {
      try {
               UIManager.setLookAndFeel( new com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel() );
            }
      catch ( UnsupportedLookAndFeelException USLF )
      {
      System.err.println("This Test Needs Nimbus !");
            }
            new JMenuTest();
         }
      }
      ---------- END SOURCE ----------

            alexp Alexander Potochkin (Inactive)
            igor Igor Nekrestyanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: