title: How to set custom vertex using mxgraph
body: <p>We are writing a program to generate a graph using <code>mxgraph</code>. Our requirement is "we need to display an image as a vertex". We have tried many codes, but we are not able to get the image. (The path of the image is right) We are able to chande the shape of the node and add colour, but not able to include image as the vertex. our code is as follows</p>
  
  <pre><code>         Document xmlDocument = mxDomUtils.createDocument();
           Element sourceNode = xmlDocument.createElement("Source");
           Element targetNode = xmlDocument.createElement("Target");
           Element subtargetNode = xmlDocument.createElement("Subtarget");
           mxGraph graph = new mxGraph();
           Object parent = graph.getDefaultParent();
           graph.getModel().beginUpdate();
           try{
                 Object v1 = graph.insertVertex(parent, null, "source", 20, 20,80, 30,"shape=ellipse");
                 Object v2 = graph.insertVertex(parent, null, "destination", 200, 20,80, 30,"shape=image;image=H:\\mywork\\mxgraph\\bin\\mypack\\bg2.jpg");
                 graph.insertEdge(parent, null, "", v1,v2,"startArrow=none;endArrow=diamond;strokeWidth=4;strokeColor=#66FF00");
           }
  </code></pre>
  
  <p>Please guide us as to what has to be corrected in the above code to get an image as my vertex.</p>