public void addLink(int s, int d){
        Node S = null;
        Node P = null;
        for(Node N : network)
        {
            if(N.id == s)
            {
                S = N; 
            }
            if(N.id == d)
            {
                P = N;
            }
        }
        if(S != null && P != null)
        {
            S.addLink(new Link(P));
            P.addLink(new Link(S));
            D.getGraphPanel().addLink(S.id, P.id);
            D.getGraphPanel().repaint();
        }
        else
        {
            System.err.println("Cannot find both nodes: " + s + " and " + d);
        }
    }