package View;

import javax.swing.*;
import java.awt.*;

public class PanneauImage extends JPanel {
    private Image imageDeFond;

    public PanneauImage(Image image) {
        this.imageDeFond = image;
    }

    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        if (imageDeFond != null) {
            g.drawImage(imageDeFond, 0, 0, getWidth(), getHeight(), this);
        }
    }
}
