public Test() extends Window { setTitle("Menu Test"); ToolStripMenuButton toolStripMenuButton = new ToolStripMenuButton(); toolStripMenuButton.setMenu(new Menu()); Menu menu = toolStripMenuButton.getMenu(); MenuItem mi = new MenuItem(""); mi.setEmbeddedComponent(createTwoButtonStack("First", "Second")); menu.addItem(mi); mi = new MenuItem(""); mi.setEmbeddedComponent(createTwoButtonStack("Third", "Fourth")); menu.addItem(mi); // Report Group RibbonGroup ribbonGroup = new RibbonGroup(); ribbonGroup.setTitle("Test"); ribbonGroup.setTitleAlign(Alignment.LEFT); ribbonGroup.setNumRows(1); ribbonGroup.addControl(toolStripMenuButton); addItem(ribbonGroup); } private HStack createTwoButtonStack(String label1, String label2) { Button button1 = new Button(label1); button1.setWidth(50); button1.setHeight(30); Button button2 = new Button(label2); button2.setWidth(50); button2.setHeight(30); HStack stack = new HStack(); stack.setWidth(50); stack.setHeight(30); stack.setMembers(button1, button2); return stack; } }