@Override
        public void paint(Graphics jframeg) {
            //super.paint(g);
            Graphics g = bi.getGraphics();
            g.setColor(Color.white);
            g.fillRect(0, 0, 500, 500);

            for (int i = 0; i < points.size(); i++) {

                GeoRef p = points.get(i);

                if (p == selected) {
                    g.setColor(Color.red);
                } else {
                    g.setColor(Color.black);
                }

                if (i==0){
                    g.setColor(Color.blue);
                }

                int radius = 10;
                g.fillArc((int) p.getX() - radius / 2, (int) p.getY() - radius / 2, radius, radius, 0, 360);
            }
            g.setColor(Color.green);
            if (points.size() >= 3) {
                algorithm.loadData(points);
                algorithm.run();
                for (int i = 0; i < algorithm.conjunct.size(); i++) {
                    GeoRef p = algorithm.conjunct.get(i);
                    GeoRef q = algorithm.conjunct.get((i + 1) % algorithm.conjunct.size());

                    if (i == 0) {
                        g.setColor(Color.blue);
                        g.drawLine((int) p.getX(), (int) p.getY(), (int) q.getX(), (int) q.getY());
                        g.setColor(Color.green);
                    } else {
                        g.drawLine((int) p.getX(), (int) p.getY(), (int) q.getX(), (int) q.getY());
                    }
                    //char[] ar = ("L:"+p.distance(q)).toCharArray();
                    char[] ar = ("["+p+"]").toCharArray();
                    g.drawChars(ar,0,ar.length,(int) p.getX(), (int) p.getY());
                }
            }
            jframeg.drawImage(bi, 0, 0, null);
        }