title: Align JMenuItem text regardless of whether or not an ImageIcon is used
body: <p>I have a Menu that when I have an ImageIcon on the menu, it move the text to the right. I would like it to always move the text to the right regardless of whether or not there is an ImageIcon used for the menu. </p>
  
  <p>I have tried setting the horizontal alignment.</p>
  
  <p><a href="https://i.stack.imgur.com/Y93hV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y93hV.png" alt="MenuWithAndWithoutImageIcon"></a></p>
  
  <p>You can see what is happening in the attached image. I am using the following code (ignore the horizontal alignment as I was testing )</p>
  
  <pre><code>JMenuItem menuItem = new JMenuItem(childmenu.getProperty(MenuDef.text()));
              menuItem.setHorizontalAlignment(SwingConstants.LEFT);
              menuItem.setToolTipText(childmenu.getProperty(MenuDef.tooltip()));
              String image = childmenu.getProperty(MenuDef.image());
              HIcon icon = ThinClient.iconManager().getIcon(image);
              if(icon!=null)
                  menuItem.setIcon(icon.getIcon());
  </code></pre>
  
  <p>Some menus will have images and some will not but I don't want the text alignment to look bad. </p>