public void chooseShape(Point.Double p) {
        JRadioButton rectangle = new JRadioButton();
        JRadioButton circle = new JRadioButton();
        JPanel radiopanel = shapeRadioPanel(rectangle, circle);
        rectangle.setSelected(true);
        circle.setSelected(false);
        int chooseShape = JOptionPane.showConfirmDialog(null, radiopanel, "Choose shape.", JOptionPane.OK_CANCEL_OPTION);
        if (chooseShape == JOptionPane.CANCEL_OPTION || chooseShape == JOptionPane.CLOSED_OPTION) {
            return;
        } else if (chooseShape == JOptionPane.OK_OPTION) {
            shape = temp;
        }
        switch (shape) {
            case "Rectangle":
                if (p == null) {
                    rectangleOptions();
                } else {
                    rectangleOptions(p);
                }
                break;
            case "Circle":
                if (p == null) {
                    circleOptions();
                } else {
                    circleOptions(p);
                }
                break;
        }
    }