public DrawPanel() {
        setBackground(Color.WHITE);
        lines = new MyLine[5];
        ovals = new MyOval[5];
        rectangles = new MyRectangle[5];

        for (int count = 0; count < lines.length; count++) {
            int x1 = rnd.nextInt(300);
            int y1 = rnd.nextInt(300);
            int x2 = rnd.nextInt(300);
            int y2 = rnd.nextInt(300);

            Color color = new Color(rnd.nextInt(256), rnd.nextInt(256),
                    rnd.nextInt(256));
            lines[count] = new MyLine(x1, y1, x2, y2, color);
            ovals[count] = new MyOval(x1, y1, x2, y2, color, rnd.nextBoolean());
            rectangles[count] = new MyRectangle(x1, x2, y1, y2, color, rnd.nextBoolean());

        }
    }