private void dijkstraButtonClick(java.awt.event.ActionEvent evt) {                                         
        //GraphPoint[] gps =  graph.getSelectedPoints();
//        GraphElement[] ges;// = GraphElement[0];
//        if (gps.length == 2) {
//            ges = graph.getDijkstraPath(gps[0], gps[1]);
//        } else {
//            return;
//        }
        
        GraphElement[] ges = graph.getDijkstraPath();
        
        if (ges == null) {
            distanseField.setText("Infinit");
            return;
        }
        int dist = 0;
        for (int i = 0; i < ges.length; i++) {
            ges[i].getComponent().setColor(TREEANDMINIMUMCOLOR);
            if (GraphLine.class.isInstance(ges[i])) {
                dist += ((GraphLine)ges[i]).getWeight();
            }
        }
        distanseField.setText(dist + "");
    }