package controller; import java.util.ArrayList; import javafx.scene.layout.FlowPane; import model.HeaderMenuItem; public class HeaderMenu{ /* Data */ private ArrayList items; private FlowPane parent; /* Constructor */ public HeaderMenu(FlowPane p_parent){ this.parent = p_parent; this.items = new ArrayList(); } public void addItem(HeaderMenuItem p_item) { this.items.add(p_item); // Add to parent parent.getChildren().add(p_item); } }