public void addChild(Controller controller){
  if (children == null)   children=new ArrayList<Controller>();
  children.add(controller);
  controller.parent=this;
}

public void addChild ( Controller controller ) { if ( children == null ) children = new ArrayList < Controller > ( ) ; children . add ( controller ) ; controller . parent = this ; }
add a child controller .
