@Override
    public AbstractTableModel getTableModel() {
        return new AbstractTableModel() {

            @Override
            public String getColumnName(int col) {
                return columnsNames[col];
            }

            @Override
            public int getRowCount() {
                return entretiens.size();
            }

            @Override
            public int getColumnCount() {
                return columnsNames.length;
            }

            @Override
            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return true;
            }

            @Override
            public Object getValueAt(int rowIndex, int columnIndex) {
                Entretien entretien = entretiens.get(rowIndex);
                switch (columnIndex) {

                    case 0:
                        return entretien.getDescription();
                    case 1:
                        return entretien.getKmEntretienFait();
                    case 2:
                        return entretien.getDateEntretien();
                    case 3:
                        return entretien.getIdmaterielroulant();

                    default:
                        return null;
                }
            }

            @Override
            public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
                Entretien entretien = entretiens.get(rowIndex);
                switch (columnIndex) {

                    case 0:
                        entretien.setDescription((String) aValue);
                        break;
                    case 1:
                        entretien.setKmEntretienFait(Integer.valueOf((String) aValue));
                        break;
                    case 2:
                        entretien.setDateEntretien(new Date());

                    case 3:
                        entretien.setIdmaterielroulant((String) aValue);
                        break;

                }
                try {
                    abstractControleur.controleEtModifie(entretien);
                } catch (ValidationException ex) {
                    //TODO JOptionPane
                }
            }
        };
    }