public ChessFrame(MouseListener c) {

        super();
        this.controller = c;
        Dimension boardSize = new Dimension(sizex, sizey);


        JPanel sideBar = new JPanel();
        sideBar.setPreferredSize(new Dimension(150, 800));
        displayJoueur = new JLabel("Aux blancs de jouer");
        displayTimer = new JLabel("<html>Temps de jeu : <br>00 : 00 : 00</html>");
        displayTimerTour = new JLabel("<html>Temps du tour : <br>00 : 00</html>");
        boutonReset = new JButton();
        boutonReset.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent ae) {
                ((ChessController) controller).resetPlateau();
            }
        });

        this.menuBar = new JMenuBar();
        JMenu file = new JMenu("File");
        JMenuItem save = new JMenuItem("Sauvegarder");
        save.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent ae) {

                JFileChooser chooser = new JFileChooser();
                FileNameExtensionFilter filter = new FileNameExtensionFilter(
                        "Chess Saves", "chs");
                chooser.setFileFilter(filter);
                chooser.setApproveButtonText("Enregistrer");
                int returnVal = chooser.showOpenDialog(chooser);
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                    if (chooser.getSelectedFile().toString().contains(".chs")) {
                        ((ChessController) controller).save(chooser.getSelectedFile().toString(), timerTour, timerSeconde);
                    } else {
                        ((ChessController) controller).save(chooser.getSelectedFile() + ".chs", timerTour, timerSeconde); //get File selected by user
                    }
                }
            }
        });
        JMenuItem load = new JMenuItem("Charger");
        load.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent ae) {

                JFileChooser chooser = new JFileChooser();
                FileNameExtensionFilter filter = new FileNameExtensionFilter(
                        "Chess Saves", "chs");
                chooser.setFileFilter(filter);
                int returnVal = chooser.showOpenDialog(chooser);
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                    ((ChessController) controller).load(chooser.getSelectedFile());
                }
            }
        });
        JMenuItem exit = new JMenuItem("Quitter");
        exit.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent ae) {
                System.exit(0);
            }
        });
        file.add(save);
        file.add(load);
        file.add(exit);
        this.menuBar.add(file);
        setJMenuBar(this.menuBar);


        boutonReset.setText("Reset");
        sideBar.add(displayJoueur);
        sideBar.add(displayTimer);
        sideBar.add(displayTimerTour);
        sideBar.add(boutonReset);
        //  Use a Layered Pane for this this application
        layeredPane = new JLayeredPane();
        getContentPane().setLayout(new FlowLayout());
        getContentPane().add(layeredPane);
        getContentPane().add(sideBar);
        layeredPane.setPreferredSize(boardSize);
        layeredPane.addMouseListener(c);
        layeredPane.addMouseMotionListener(this);

        //Add a chess board to the Layered Pane 

        chessBoard = new JPanel();
        layeredPane.add(chessBoard, JLayeredPane.DEFAULT_LAYER);
        chessBoard.setLayout(new GridLayout(8, 8));
        chessBoard.setPreferredSize(boardSize);
        chessBoard.setBounds(0, 0, boardSize.width, boardSize.height);

        for (int i = 0; i < 64; i++) {
            JPanel square = new JPanel(new BorderLayout());
            square.setBorder(new javax.swing.border.BevelBorder(BevelBorder.RAISED));
            chessBoard.add(square);

            int row = (i / 8) % 2;
            if (row == 0) {
                square.setBackground(i % 2 == 0 ? Color.black : Color.white);
            } else {
                square.setBackground(i % 2 == 0 ? Color.white : Color.black);
            }
        }

        this.t = new javax.swing.Timer(1000, new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent ae) {
                timerSeconde++;
                timerTour++;
                affichageTimers();
            }
        });

        this.t.setInitialDelay(1000);
        this.t.start();

    }