@Override
    public void update(Observable o, Object o1) {
        for (Component c : pannello.getComponents()) {
            ((JButton) c).setBorder(null);
            if (((JButton) c).getComponentCount() > 0) {
                ((JButton) c).remove(0);
            }
        }
        for (int i = 0; i < model.getTabellone().length; i++) {
            for (int j = 0; j < model.getTabellone()[i].length; j++) {
                ImageIcon icon = null;
                if (model.getTabellone()[i][j] != 0) {
                    if (model.getTabellone()[i][j] == 1) {
                        icon = blackDama;
                    }
                    if (model.getTabellone()[i][j] == 2) {
                        icon = whiteDama;
                    }
                    if (model.getTabellone()[i][j] == 3) {
                        icon = blackDamone;
                    }
                    if (model.getTabellone()[i][j] == 4) {
                        icon = whiteDamone;
                    }
                    Pedina button = new Pedina(icon, this);
                    button.setName(i + " " + j);
                    ((Cell) pannello.getComponent(i * 8 + j)).add(button);
                }
            }
        }
        pannello.revalidate();
        pannello.repaint();
    }