Want to add image to my programe : The class I have show you it had call by another class that class extend JPanel, And this class use for create Rectangle and have property when it collision with another. And I want to know how to add image to the Rectangle
,If the graphics2D can't add the image I want to change it to label or something it work. pls guide me

    import java.awt.*;
    import java.awt.image.BufferedImage;

    public class Entity{

    private int x;
    private int y;
    private int size;
    private BufferedImage image;

        public Entity(int x){
            this.size = x;
        }

        public int getX() {
            return x;
        }

        public int getY() {
            return y;
        }

        public void setX(int x) {
            this.x = x;
        }

        public void setY(int y) {
            this.y = y;
        }

        public void setPosition(int x, int y){
            this.x = x;
            this.y = y;
        }

        public Rectangle getBound(){
            return new Rectangle(x ,y,size, size);
        }

        public boolean isCollid(Entity e){
            if (e == this) return false;
            return getBound().intersects(e.getBound());
        }

        public void render(Graphics2D g2d){
            g2d.fillRect(x, y, size, size);
        }
    }