private void jButtonPaysValiderMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButtonPaysValiderMousePressed
        
        if (this.jButtonPaysValider.getText().equals("Valider")) {
            try {
                RequetesPays.insertPays(jTextFieldPays.getText().toUpperCase());
            } catch (SQLException ex) {
                if (ex.getErrorCode() == 1062) {
                    JOptionPane.showMessageDialog(this, "Ce Pays existe déjà", " Erreur ", JOptionPane.ERROR_MESSAGE);
                }
                Logger.getLogger(VuePays.class.getName()).log(Level.SEVERE, null, ex);
            }
        }

      else  {
            try {
                RequetesPays.updatePays(((Pays) this.jComboBoxPays.getSelectedItem()).getIdPays(), jTextFieldPays.getText().toUpperCase());
            } catch (SQLException ex) {
                if (ex.getErrorCode() == 1062) {
                    JOptionPane.showMessageDialog(this, "Ce Pays existe déjà", "Erreur ", JOptionPane.ERROR_MESSAGE);
                }
                Logger.getLogger(VuePays.class.getName()).log(Level.SEVERE, null, ex);
            }
        }


    }//GEN-LAST:event_jButtonPaysValiderMousePressed