0

i want to delete edge which is actually connector between veritce of two shapes. i want to delete connector between the vertices which are selected by click a button. i have used this code but it does not give me help.

 graph.getModel().beginUpdate();
 try {
   graph.getModel().remove( edge);
} finally {
   graph.getModel().endUpdate();
}

i have much study the answer of http://forum.jgraph.com/questions/4744/delete-edge this question but it does not give us any help. thanks

Frodo Baggins
  • 8,290
  • 6
  • 45
  • 55
Sara Khan
  • 1
  • 1
  • 2

1 Answers1

1
JButton b1 = new JButton ("Clear");
b1.addActionListener(new ActionListener(){
    // cell = component.getCellAt(e.getX(), e.getY());

    @Override
    public void actionPerformed(ActionEvent arg0){
        graph.selectChildCell();
        graph.removeCells();
    }
});
Ozan
  • 4,345
  • 2
  • 23
  • 35
  • Try to avoid all-code answers, explain what you are doing in your code instead of just posting it. – Jojodmo Feb 02 '14 at 03:04