Object parent = graph.getDefaultParent();
graph.getModel().beginUpdate();
try
{
Object v1 = graph
.insertVertex(parent, null, "Hello", 20, 20, 80, 30,
"shape=and;fillColor=#ff0000;gradientColor=#ffffff;shadow=1");
Object v2 = graph.insertVertex(parent, null, "World!", 240,
150, 80, 30, "shape=xor;shadow=1");
graph.insertEdge(parent, null, "Edge", v1, v2);