private void treeButtonClick(java.awt.event.ActionEvent evt) {                                         
        GraphElement[] ges = graph.getMinimalSpanningTree();
        if (ges == null) return;
        for (int i = 0; i < ges.length; i++) {
            ges[i].getComponent().setColor(TREEANDMINIMUMCOLOR);
        }
    }