Object parent = graph.getDefaultParent();
graph.getModel().beginUpdate();
try
{
Object v1 = graph.insertVertex(parent, null, "Hello,", 20, 20, 80,
60, "shape=triangle;perimeter=trianglePerimeter");
Object v2 = graph.insertVertex(parent, null, "World!", 200, 150,
80, 60, "shape=ellipse;perimeter=ellipsePerimeter");
Object v3 = graph.insertVertex(parent, null, "Hello,", 200, 20, 80,
30);