!7

p-substance {
  new JMenuBar mb;
  
  // A menu for reference
  JMenu menu = new JMenu("Menu");
  addMenuItem(menu, "Item", null);
  mb.add(menu);
  
  // And the direct item
  mb.add(new JMenuItem(abstractAction("Hello", r { infoBox("Hello") })) {
    public Dimension getMaximumSize() {
        return new Dimension(
            super.getPreferredSize().width, 
            super.getMaximumSize().height);
    }
  });
  setMenuBar(mb, showFrame());
}