public void addline(Point p1,Point p2){
        int f1=-2,f2=-2;
        Circle tmp1 = new Circle(p1);
        Circle tmp2 = new Circle(p2);
        for (int i=0;i<pnts.length;i++)
            if (tmp1.equals(pnts[i]))
                f1=i;
        for (int i=0;i<pnts.length;i++)
            if (tmp2.equals(pnts[i]))
                f2=i;        
        if (f1>-1 && f2>-1 && f1!=f2){
            m[f1][f2] = 1;
            m[f2][f1] = 1;
            g.drawLine(pnts[f1].pnt.x+Circle.rad/2, pnts[f1].pnt.y+Circle.rad/2, pnts[f2].pnt.x+Circle.rad/2, pnts[f2].pnt.y+Circle.rad/2);
            g1.drawLine(pnts[f1].pnt.x+Circle.rad/2, pnts[f1].pnt.y+Circle.rad/2, pnts[f2].pnt.x+Circle.rad/2, pnts[f2].pnt.y+Circle.rad/2);
        }
    }