@Override
    public Object getValueAt(int rowIndex, int columnIndex) {
        switch (columnIndex) {
            case 0: 
               return teachers.get(rowIndex).getIdTeacher(); 
            case 1: 
               return teachers.get(rowIndex).getName();
            case 2: 
               return teachers.get(rowIndex).getName2();
            case 3:
                return teachers.get(rowIndex).getSurname();
            case 4:
                return teachers.get(rowIndex).getIdDepartment().getIdDepartment();
            case 5:
                return teachers.get(rowIndex).getIdDepartment().getNameDepartment();
            default:
                return null;
        }
        
    }