package org.pentaho.ui.xul.swing.tags;

import java.awt.GridBagLayout;
import java.util.ArrayList;

import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JPanel;

import org.pentaho.ui.xul.XulComponent;
import org.pentaho.ui.xul.XulDomContainer;
import org.pentaho.ui.xul.containers.XulMenubar;
import org.pentaho.ui.xul.swing.SwingElement;

public class SwingMenubar extends SwingElement implements XulMenubar{

  private JMenuBar menuBar;
  public SwingMenubar(XulComponent parent, XulDomContainer domContainer, String tagName) {
    super("menubar");
    
    children = new ArrayList<XulComponent>();
    
    menuBar = new JMenuBar();
    managedObject = menuBar;
    
  }
  
  @Override
  public void layout(){
    for(XulComponent comp : children){
      if(comp instanceof SwingMenu){
        this.menuBar.add((JMenu) ((SwingMenu) comp).getManagedObject());
      }
    }
  }
  
}

  
@@ -31,24 +31,52 @@
 ng.tags;%0D%0A%0D%0A
+import java.awt.Dimension;%0D%0A
 import java.
@@ -700,24 +700,75 @@
 MenuBar();%0D%0A
+    menuBar.setMinimumSize(new Dimension(20,20));%0D%0A
     managedO

Set a minimum height to prevent the menu from surrendering it's entire space