d = new FunctionDialog(); d.setFunction("cos(x)^2"); d.setPoints(200); d.setRange(-10,10); d.setLabel(); d.Apply(); l = new TitleDialog(); ll = l.getLabel(); ll.setTitle("new Title"); l.setLabel(ll); l.Apply();