im trying to draw 20 rectangles on screen at once using two different classes, one for the frame and one for each rectangle, However only 1 is being drawn.   
 here is the window class   

```

    private final List<Vehicle> vehicles = new ArrayList<>();

    public Window() {
        this.initWindow();
        this.populateVehicles();
    }

    private void initWindow() {
        this.setSize(1440, 920);
        this.setResizable(false);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setTitle("Steering");
        this.setVisible(true);
    }

    public void populateVehicles() {
        for (int i = 0; i < 20; i++) {
            int x = Util.getRandomInt(10, 1000);
            int y = Util.getRandomInt(20, 800);
            Vehicle v = new Vehicle(x, y);
            this.add(v);
            vehicles.add(v);
            System.out.print("printing new rect @ " + x + " : " + y + "\n");
        }
    }

    private void repopulateVehicles() {
        if (this.vehicles.isEmpty()) return;
        for (Vehicle v : vehicles) {
            v.repaint();
        }
    }

    public void refresh(boolean hard) {
        this.repopulateVehicles();
        if (hard) {
            SwingUtilities.updateComponentTreeUI(this);
        }
    }

}

```

and here is the rectangle class

```
public class Vehicle extends JPanel {

    private int x;
    private int y;
    private int speed;

    private final int width;
    private final int height;

    public Vehicle(int x, int y) {
        this.x = x;
        this.y = y;
        this.width = 25;
        this.height = 10;
    }

    public void moveVehicle(int x_, int y_) {
        this.x += x_;
        this.y += y_;
        this.repaint(x, y, x_, y_);
    }

    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        Graphics2D g2d = (Graphics2D) g;
        Color c = new Color((int) (Math.random() * 255), (int) (Math.random() * 255), (int) (Math.random() * 255));
        g2d.setColor(c);
        g2d.rotate(Math.toRadians(30));
        g2d.fillRect(this.x, this.y, this.width, this.height);
    }

    public Dimension getPreferredSize() {
        return new Dimension(this.width, this.height);
    }

}

```

the output is just 1 rectangle being drawn on the frame, while is should be that 20 rectangles are being drawn. the debug print statement shows that each is being drawn at different coords but they arent being shown.