@Override
        protected void paintComponent(Graphics g) {
            Graphics2D g2 = (Graphics2D) g;
            g2.clearRect(0, 0, this.getWidth(), this.getHeight());
            g2.scale(scale, scale);
            g2.translate(translateX, translateY);
            world.paint(g2);
            int count = 0;
            for (ClickFrame clickFrame : world.clickFrameList) {
                count++;
                g2.setColor(Color.getHSBColor((float) ((count * Math.E) % 1), 1f, 0.8f));
                Object object = clickFrame.object;
                Shape shape = clickFrame.object.shapes.get(clickFrame.shapeIndex);
                double x1 = (clickFrame.getX() - this.getLocationOnScreen().x) / scale - translateX;
                double y1 = (clickFrame.getY() - this.getLocationOnScreen().y) / scale - translateY;
                double x2 = object.position.x;
                double y2 = object.position.y;
                Vector2D v = new Vector2D(new Point.Double(x1, y1), new Point.Double(x2, y2));
                double kx = Math.min(1, Math.max(v.point.x / clickFrame.getWidth(), 0));
                double ky = Math.min(1, Math.max(v.point.y / clickFrame.getHeight(), 0));
                x1 += (clickFrame.getWidth() * kx) / scale;
                y1 += (clickFrame.getHeight() * ky) / scale;
                v = new Vector2D(new Point.Double(x1, y1), new Point.Double(x2, y2));
                Vector2D diagonal;
                if (Math.abs(v.point.x) < Math.abs(v.point.y)) {
                    double dx = v.point.x / Math.abs(v.point.x);
                    double dy = v.point.y / Math.abs(v.point.y);
                    diagonal = new Vector2D(new Point.Double(Math.abs(v.point.x) * dx, Math.abs(v.point.x) * dy));
                } else {
                    double dx = v.point.x / Math.abs(v.point.x);
                    double dy = v.point.y / Math.abs(v.point.y);
                    diagonal = new Vector2D(new Point.Double(Math.abs(v.point.y) * dx, Math.abs(v.point.y) * dy));
                }
                if (shape instanceof RectangleShape) {
                    RectangleShape rs = (RectangleShape) shape;
                    if (v.point.x == 0 || v.point.y == 0) {
                        g2.drawLine((int) x1, (int) y1, (int) x2, (int) y2);
                    } else {
                        g2.drawLine((int) x1, (int) y1, (int) (x1 + diagonal.point.x), (int) (y1 + diagonal.point.y));
                        g2.drawLine((int) (x1 + diagonal.point.x), (int) (y1 + diagonal.point.y), (int) (x2), (int) (y2));
                    }
                } else if (shape instanceof CircleShape) {
                    CircleShape cs = (CircleShape) shape;
                    if (v.point.x == 0 || v.point.y == 0) {
                        g2.drawLine((int) x1, (int) y1, (int) x2, (int) y2);
                    } else {
                        g2.drawLine((int) x1, (int) y1, (int) (x1 + diagonal.point.x), (int) (y1 + diagonal.point.y));
                        g2.drawLine((int) (x1 + diagonal.point.x), (int) (y1 + diagonal.point.y), (int) (x2), (int) (y2));
                    }
                }
            }
            g2.translate(-translateX, -translateY);
        }