public static void buttonRandomClicked() {
        Random r = new Random();
        for (int i = 0; i < 10; i++) {
            boolean isCons = false;
            int X = 10 + r.nextInt(jLabel1.getWidth() - 20);
            int Y = 10 + r.nextInt(jLabel1.getWidth() - 20);
            for (Shapes.Point point : points) {
                isCons = point.isContained(new Shapes.Point(X, Y));
                if (isCons) break;
            }
            if (!isCons) {
                points.add(new Shapes.Point(X, Y));
                clearImage();
                showPoints();
            }
            jLabel1.repaint();
        }
        jButton2.setEnabled(points.size() > 2);
    }