title: JMenuItem text and accelerator alignment in right to left orientation
body: <p>I'm using right to left menus in a Java application.<br>
  I used this on all <code>JMenuBar</code>,<code>JMenu</code> &amp; <code>JMenuItem</code> elements to make them right to left:  </p>
  
  <pre><code>jmenubar.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
  jmenu1.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
  jmenuitem1.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
  </code></pre>
  
  <p>Now the problem is <code>JMenuItem</code>'s <strong>text is aligned right correctly</strong> but <strong>its keyboard accelerator is misaligned</strong> as this image shows (F2 &amp; F3 are out of view and others are not aligned left):<br>
  <img src="https://i.stack.imgur.com/OvKD5.png" alt="F2 &amp; F3 are out of view and others are not aligned left"></p>
  
  <p><strong>Question:</strong> How can fix a right to left <code>JMenuItem</code>'s accelerator alignment?</p>
  
  <hr>
  
  <p>For SSCCE:<br>
  This Code Produces the problem:  </p>
  
  <pre><code>public class test{
      public static void main(String[] args){
          try{
              javax.swing.SwingUtilities.invokeLater(new Runnable() {
                  @Override
                  public void run() {
                          javax.swing.JFrame frame = new javax.swing.JFrame("test");
                          frame.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);
                      javax.swing.JMenuBar menubar = new javax.swing.JMenuBar();
                      javax.swing.JMenu jmenu1 = new javax.swing.JMenu("\u0645\u0646\u0648");
                      javax.swing.JMenuItem jmenuitem1 = new javax.swing.JMenuItem("\u0645\u0646\u0648 \u06F1");
                      javax.swing.JMenuItem jmenuitem2 = new javax.swing.JMenuItem("\u0645\u0646\u0648 \u06F2");
                      javax.swing.JMenuItem jmenuitem3 = new javax.swing.JMenuItem("\u0645\u0646\u0648 \u06F3");
                      javax.swing.JMenuItem jmenuitem4 = new javax.swing.JMenuItem("\u0645\u0646\u0648 \u06F4");
                      jmenuitem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F2, 0));
                      jmenuitem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F3, 0));
                      jmenuitem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.CTRL_MASK|java.awt.event.InputEvent.ALT_MASK));
                      jmenuitem4.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_D, java.awt.event.InputEvent.CTRL_MASK));
                      menubar.applyComponentOrientation(java.awt.ComponentOrientation.RIGHT_TO_LEFT);
                      jmenu1.applyComponentOrientation(java.awt.ComponentOrientation.RIGHT_TO_LEFT);
                      jmenuitem1.applyComponentOrientation(java.awt.ComponentOrientation.RIGHT_TO_LEFT);
                      jmenuitem2.applyComponentOrientation(java.awt.ComponentOrientation.RIGHT_TO_LEFT);
                      jmenuitem3.applyComponentOrientation(java.awt.ComponentOrientation.RIGHT_TO_LEFT);
                      jmenuitem4.applyComponentOrientation(java.awt.ComponentOrientation.RIGHT_TO_LEFT);
                      jmenu1.setFont(new java.awt.Font("Times New Roman", 0, 15));
                      jmenuitem1.setFont(new java.awt.Font("Times New Roman", 0, 15));
                      jmenuitem2.setFont(new java.awt.Font("Times New Roman", 0, 15));
                      jmenuitem3.setFont(new java.awt.Font("Times New Roman", 0, 15));
                      jmenuitem4.setFont(new java.awt.Font("Times New Roman", 0, 15));
  
                      frame.setJMenuBar(menubar);
                      menubar.add(jmenu1);
                      jmenu1.add(jmenuitem1);
                      jmenu1.add(jmenuitem2);
                      jmenu1.add(jmenuitem3);
                      jmenu1.add(jmenuitem4);
                          frame.setVisible(true);
                      frame.pack();
                      frame.setSize(200,200);
                  }
              });
          }catch(java.lang.Exception e){
              System.out.println(e.getMessage());
          }
      }
  }
  </code></pre>