public void removeSelected(){
        if (selected instanceof Node){
            PSTricksGraphEditor.graph.removeNode((Node) selected);
        }else if (selected instanceof Edge){
            PSTricksGraphEditor.graph.removeEdge((Edge) selected);
        }else if (selected instanceof PSTLabel)
            PSTricksGraphEditor.graph.removeLabel((PSTLabel) selected);
        selected = null;
        repaint();
    }