private boolean verifierSelection(Type[] types, int ID) {
        boolean ok = false;
        Type verification = cc.getCircuit().getCompEmp(ID).getType();
        for (Type t : types) {
            if (t == verification) {
                ok = true;
            }
        }
        if (!ok) {
            JOptionPane.showMessageDialog(frame.getFrame(), "Sélection incorrecte");
        }
        return ok;
    }