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

public class Fenetre extends JFrame {

	public Fenetre() {
		this.setSize(500,500);
		this.setLocation(100,100);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		this.setLayout(new GridLayout(10, 10));

		JPanel[][] cases = new JPanel[10][10];
		int[][] grille = new int[10][10];

		for (int i = 0; i != 10; i++) {
			for (int j = 0; j != 10; j++) {
				cases[i][j] = new JPanel();
				cases[i][j].setBackground(new Color(37, 150, 190));
				cases[i][j].setBorder(BorderFactory.createLineBorder(Color.WHITE));
				cases[i][j].addMouseListener(new ClicCase(cases, grille, i, j));
				this.add(cases[i][j]);

				grille[i][j] = 0;
			}
		}
	}
}