public Component getRendererComponent(SubGraph sd) {
        sgbck=sd;
        final SubGraph mysd = new SubGraph(sd.graph);
        mysd.vertices = new HashSet<Vertex>(sd.vertices);
        mysd.edges = new HashSet<Edge>(sd.edges);
        mysd.label = sd.label;
        String txt = "";
        txt = "<HTML><BODY>";
        if (mysd.label != null && !mysd.label.equals("")) {
            txt += "<B>" + mysd.label + ": </B><BR>";
        }

        if (mysd.vertices != null && mysd.vertices.size() > 0) {
            txt = txt + "<B>V: </B> {";
            for (Vertex v : mysd.vertices) {
                txt = txt + v.getLabel() + ", ";
            }
            txt = txt.substring(0, txt.length() - 2) + "}";
        }
        if (mysd.edges != null && mysd.edges.size() > 0) {
            txt += "<BR><B>E: </B> {";
            for (Edge e : mysd.edges) {
                txt = txt + e.source.getLabel() + "-"+ e.target.getLabel() + ", ";
            }
            txt = txt.substring(0, txt.length() - 2) + "}";
        }
        txt = txt + "</BODY></HTML>";
        JLabel l = new JLabel(txt) {
            @Override
            public void setForeground(Color fg) {
                super.setForeground(fg);
                if (fg== GCellRenderer.SELECTED_COLOR)
                    showOnGraph(mysd);
            }
        };
        l.addMouseListener(new MouseAdapter() {
            public void mouseClicked(MouseEvent e) {
                showOnGraph(mysd);
            }
        }

        );
        return l;
    }