gp.getNanoGraph().setDefaultNodeRenderer(nodeRenderer);
gp.getNanoGraph().setDefaultEdgeRenderer(edgeRenderer);
// you can render different types of nodes differently
gp.getNanoGraph().registerNodeRenderer(String.class, nodeRenderer);
gp.getNanoGraph().registerNodeRenderer(MyNode.class, nodeRenderer);
gp.getNanoGraph().registerDockingStrategy(String.class, new IntersectionDockingStrategy());
}