@Override
        public void mousePressed(MouseEvent e) {
            System.out.println("pressed");
            GeoRef mp = new GeoRef(points.size(), e.getX(), e.getY());
            double distance = 10;
            for (GeoRef p : points) {
                if ((p.distance(mp) < distance)) {
                    selected = p;
                    distance = selected.distance(mp);
                }
            }
            if (selected != null && e.getButton() == 3) {
                points.remove(selected);
                jframe.repaint();
                return;
            }
            if (selected == null) {
                System.out.println("new point");
                selected = new GeoRef(points.size(), e.getX(), e.getY());
                points.add(selected);
                jframe.repaint();
            }
        }