public void update(Graphics g) {
        //先清空画布
        g.clearRect(0, 0, this.getWidth(), this.getHeight());
        //遍历画出所有点
        System.out.println("update : " + MainFrame.points.size());
        Iterator<Point> pList = MainFrame.points.iterator();
        Point p;
        while(pList.hasNext()) {
            p = pList.next();
            g.setColor(Color.BLACK);
            g.fillOval(p.x, p.y, 5, 5);
            g.setColor(Color.BLUE);
            //将点的屏幕坐标 转变为 坐标轴坐标再显示
            g.drawString("("+ (p.x - oPoint.x)+","+(oPoint.y - p.y)+")", p.x, p.y);
        }
        //画坐标轴
        paint(g);
    }