pidev.tunipharma.gui.InterfaceAdmin.java Source code

Java tutorial

Introduction

Here is the source code for pidev.tunipharma.gui.InterfaceAdmin.java

Source

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package pidev.tunipharma.gui;

import java.awt.BorderLayout;
import java.io.IOException;
import pidev.tunipharma.utils.GUIUtil;
import java.util.Date;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JPanel;
import javax.swing.JTextField;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
import org.jfree.data.category.CategoryDataset;
import pidev.tunipharma.classes.Compte;
import pidev.tunipharma.classes.Evenement;
import pidev.tunipharma.classes.Gouvernorat;
import pidev.tunipharma.classes.Pharmacie;
import pidev.tunipharma.classes.Statistiques;
import pidev.tunipharma.classes.TypeService;
import pidev.tunipharma.classes.Ville;
import pidev.tunipharma.dao.ComptesDAO;
import pidev.tunipharma.dao.EvenementsDAO;
import pidev.tunipharma.dao.PharmaciesDAO;
import pidev.tunipharma.dao.StatistiquesDAO;
import pidev.tunipharma.dao.TypesServiceDAO;
import static pidev.tunipharma.gui.TableButton.makeTable;
import pidev.tunipharma.utils.CharUtil;

/**
 *
 * @author imen
 */
public class InterfaceAdmin extends javax.swing.JFrame {

    /**
     * Creates new form acc
     */
    public InterfaceAdmin() {
        initComponents();
        //Pour mettre le fenetre dans le centre de l'ecran 
        setLocationRelativeTo(null);
        // Aggrendir la feneter lors de l'ouverture
        //setExtendedState(javax.swing.JFrame.MAXIMIZED_BOTH);

        // Remplir Les ComboBox des Gouvernorats & Villes de la base de donne
        GUIUtil.villeGouvListener(comboBoxModPhaGouv, comboBoxModPhaVille, true);
        GUIUtil.villeGouvListener(comboBoxAjoutPhaGouv, comboBoxAjoutPhaVille, false);
        GUIUtil.fillGouvsCB(comboBoxModPhaGouv, true);
        GUIUtil.fillGouvsCB(comboBoxAjoutPhaGouv, false);

        // Ajout de listener - Ajout Compte Form
        GUIUtil.onChangeEmpty(txtAjoutCptNom, btAjoutCptConfirmer);
        GUIUtil.onChangeEmpty(txtAjoutCptPrenom, btAjoutCptConfirmer);
        GUIUtil.onChangeEmpty(txtAjoutCptAddresse, btAjoutCptConfirmer);
        GUIUtil.onChangeEmail(txtAjoutCptEmail, btAjoutCptConfirmer);
        GUIUtil.onChangeNumber(txtAjoutCptTel, btAjoutCptConfirmer);
        GUIUtil.onChangeMDP(txtAjoutCptMDP, txtAjoutCptRMDP, btAjoutCptConfirmer);

        // Ajout de listener - Ajout Pharmacie Form
        GUIUtil.onChangeEmpty(txtAjoutPhaNom, btAjoutPhaConfirmer);
        GUIUtil.onChangeEmpty(txtAjoutPhaAddresse, btAjoutPhaConfirmer);
        GUIUtil.onChangeEmpty(txtAjoutPhaLatitude, btAjoutPhaConfirmer);
        GUIUtil.onChangeEmpty(txtAjoutPhaLongitude, btAjoutPhaConfirmer);
        GUIUtil.onChangeEmail(txtAjoutPhaEmail, btAjoutPhaConfirmer);
        GUIUtil.onChangeNumber(txtAjoutPhaFax, btAjoutPhaConfirmer);
        GUIUtil.onChangeNumber(txtAjoutPhaTel, btAjoutPhaConfirmer);
        //GUIUtils.setFieldListener(panelAjoutCpt);

        //Ajouter controlle de saisie sur les champs de l'ajout de type de service
        GUIUtil.onChangeEmpty(txtMaPhaAjoutSrvNom, btMaPhaAjoutSrvConfirmer);
        GUIUtil.onChangeEmpty(txtMaPhaAjoutSrvDesc, btMaPhaAjoutSrvConfirmer);

        // Remplissage de combo box des repsonsable pharmacie
        GUIUtil.fillPharmacienCB(comboBoxAjoutPhaResponsable);

        genStat(Statistiques.STAT_INSCRIPTION, panelStatsInscri, "Statistique d'inscription", "Mois",
                " Nombre d'inscriptions ");
        genStat(Statistiques.STAT_RECHERCHE, panelStatsNbrReq, "Statistique de recherche", "Mois",
                " Nombre de requette de recherche ");
        //genStat(Statistiques.STAT_VOTE, panelStatsNotePha);

    }

    private void genStat(int type, JPanel p, String titre, String xName, String yName) {
        try {
            System.out.println(" Chart Test ");
            CategoryDataset dataset = CharUtil.createDataset(StatistiquesDAO.getInstance().readByIdType(type));
            JFreeChart graphe = CharUtil.createChart(dataset, titre, xName, yName);
            ChartPanel chartPanel = new ChartPanel(graphe);
            //chartPanel.setPreferredSize(new java.awt.Dimension(400, 400));
            p.setLayout(new BorderLayout());
            p.add(chartPanel, BorderLayout.NORTH);
        } catch (IOException ex) {
            Logger.getLogger(InterfaceAdmin.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        tabbedPaneAdministration = new javax.swing.JTabbedPane();
        tabbedPaneStats = new javax.swing.JTabbedPane();
        scrollPaneStatInscri = new javax.swing.JScrollPane();
        panelStatsInscri = new javax.swing.JPanel();
        scrollPaneStatsNbrReq = new javax.swing.JScrollPane();
        panelStatsNbrReq = new javax.swing.JPanel();
        scrollPaneStatsNotePha = new javax.swing.JScrollPane();
        panelStatsNotePha = new javax.swing.JPanel();
        tabbedPaneGestionCpt = new javax.swing.JTabbedPane();
        panelAjoutCpt = new javax.swing.JPanel();
        jPanel6 = new javax.swing.JPanel();
        jPanel11 = new javax.swing.JPanel();
        lbAjoutCptNomCpt = new javax.swing.JLabel();
        txtAjoutCptNom = new javax.swing.JTextField();
        lbAjoutCptPrenomCpt = new javax.swing.JLabel();
        txtAjoutCptPrenom = new javax.swing.JTextField();
        lbAjoutCptEmailCpt = new javax.swing.JLabel();
        txtAjoutCptEmail = new javax.swing.JTextField();
        lbAjoutCptTelCpt = new javax.swing.JLabel();
        txtAjoutCptTel = new javax.swing.JTextField();
        lbAjoutCptMDPCpt = new javax.swing.JLabel();
        txtAjoutCptMDP = new javax.swing.JPasswordField();
        lbAjoutCptRMDPCpt = new javax.swing.JLabel();
        txtAjoutCptRMDP = new javax.swing.JPasswordField();
        lbAjoutCptAddresseCpt = new javax.swing.JLabel();
        jScrollPane10 = new javax.swing.JScrollPane();
        txtAjoutCptAddresse = new javax.swing.JTextArea();
        lbAjoutCptTypeCpt = new javax.swing.JLabel();
        comboBoxAjoutCptTypeCpt = new javax.swing.JComboBox();
        btAjoutCptConfirmer = new javax.swing.JButton();
        btAjoutCptAnuler = new javax.swing.JButton();
        panelModCpt = new javax.swing.JPanel();
        jPanel8 = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        txtModCptNom = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        txtModCptPrenom = new javax.swing.JTextField();
        comboBoxModCptType = new javax.swing.JComboBox();
        scrollPaneTableModCpt = new javax.swing.JScrollPane();
        tableModCpt = new javax.swing.JTable();
        panelNouvInscrit = new javax.swing.JPanel();
        jPanel16 = new javax.swing.JPanel();
        jScrollPane9 = new javax.swing.JScrollPane();
        tableNouvInscriCpt = new javax.swing.JTable();
        tabbedPaneGestionPha = new javax.swing.JTabbedPane();
        scrollPaneAjoutPha = new javax.swing.JScrollPane();
        panelAjoutPha = new javax.swing.JPanel();
        btAjoutPhaAnnuler = new javax.swing.JButton();
        btAjoutPhaConfirmer = new javax.swing.JButton();
        jLabel34 = new javax.swing.JLabel();
        jLabel35 = new javax.swing.JLabel();
        jLabel36 = new javax.swing.JLabel();
        jLabel37 = new javax.swing.JLabel();
        txtAjoutPhaEmail = new javax.swing.JTextField();
        jLabel38 = new javax.swing.JLabel();
        jLabel39 = new javax.swing.JLabel();
        txtAjoutPhaNom = new javax.swing.JTextField();
        txtAjoutPhaFax = new javax.swing.JTextField();
        txtAjoutPhaTel = new javax.swing.JTextField();
        jScrollPane12 = new javax.swing.JScrollPane();
        txtAjoutPhaAddresse = new javax.swing.JTextArea();
        comboBoxAjoutPhaResponsable = new javax.swing.JComboBox();
        jLabel40 = new javax.swing.JLabel();
        jLabel45 = new javax.swing.JLabel();
        jLabel46 = new javax.swing.JLabel();
        comboBoxAjoutPhaVille = new javax.swing.JComboBox();
        comboBoxAjoutPhaGouv = new javax.swing.JComboBox();
        jScrollPane2 = new javax.swing.JScrollPane();
        tableJourDeGarde = new javax.swing.JTable();
        btAjoutJourGarde = new javax.swing.JButton();
        jLabel44 = new javax.swing.JLabel();
        txtAjoutPhaLongitude = new javax.swing.JTextField();
        jLabel47 = new javax.swing.JLabel();
        txtAjoutPhaLatitude = new javax.swing.JTextField();
        comboBoxAjoutPhaType = new javax.swing.JComboBox();
        jLabel48 = new javax.swing.JLabel();
        dateGarde = new com.toedter.calendar.JDateChooser();
        scrollPaneModPha = new javax.swing.JScrollPane();
        panelModPha = new javax.swing.JPanel();
        jPanel9 = new javax.swing.JPanel();
        jLabel41 = new javax.swing.JLabel();
        jLabel42 = new javax.swing.JLabel();
        jLabel43 = new javax.swing.JLabel();
        comboBoxModPhaGouv = new javax.swing.JComboBox();
        comboBoxModPhaType = new javax.swing.JComboBox();
        comboBoxModPhaVille = new javax.swing.JComboBox();
        txtModPhaNom = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jScrollPane11 = new javax.swing.JScrollPane();
        tableModPha = new javax.swing.JTable();
        panelDemandes = new javax.swing.JPanel();
        scrollPaneDemandes = new javax.swing.JScrollPane();
        tableDemandesPha = new javax.swing.JTable();
        jPanel1 = new javax.swing.JPanel();
        panelAjoutService = new javax.swing.JPanel();
        txtMaPhaAjoutSrvNom = new javax.swing.JTextField();
        jScrollPane14 = new javax.swing.JScrollPane();
        txtMaPhaAjoutSrvDesc = new javax.swing.JTextArea();
        jLabel49 = new javax.swing.JLabel();
        jLabel50 = new javax.swing.JLabel();
        btMaPhaAjoutSrvConfirmer = new javax.swing.JButton();
        buttonMaPhaAjoutSrvAnnuler = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Interface Administrateur");
        setPreferredSize(new java.awt.Dimension(1300, 700));

        tabbedPaneAdministration.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N

        tabbedPaneStats.setTabPlacement(javax.swing.JTabbedPane.LEFT);
        tabbedPaneStats.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        panelStatsInscri.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Inscription / Mois",
                javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION,
                new java.awt.Font("Tahoma", 1, 14), new java.awt.Color(0, 0, 102))); // NOI18N

        javax.swing.GroupLayout panelStatsInscriLayout = new javax.swing.GroupLayout(panelStatsInscri);
        panelStatsInscri.setLayout(panelStatsInscriLayout);
        panelStatsInscriLayout.setHorizontalGroup(panelStatsInscriLayout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 1077, Short.MAX_VALUE));
        panelStatsInscriLayout.setVerticalGroup(panelStatsInscriLayout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 634, Short.MAX_VALUE));

        scrollPaneStatInscri.setViewportView(panelStatsInscri);

        tabbedPaneStats.addTab("Statistique d'inscription", scrollPaneStatInscri);

        panelStatsNbrReq.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Nombre de requete /Mois",
                javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION,
                new java.awt.Font("Tahoma", 1, 14), new java.awt.Color(0, 0, 102))); // NOI18N

        javax.swing.GroupLayout panelStatsNbrReqLayout = new javax.swing.GroupLayout(panelStatsNbrReq);
        panelStatsNbrReq.setLayout(panelStatsNbrReqLayout);
        panelStatsNbrReqLayout.setHorizontalGroup(panelStatsNbrReqLayout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 1085, Short.MAX_VALUE));
        panelStatsNbrReqLayout.setVerticalGroup(panelStatsNbrReqLayout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 621, Short.MAX_VALUE));

        scrollPaneStatsNbrReq.setViewportView(panelStatsNbrReq);

        tabbedPaneStats.addTab("Nombre de requete /Mois", scrollPaneStatsNbrReq);

        panelStatsNotePha.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Note Pharmacie",
                javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION,
                new java.awt.Font("Tahoma", 1, 14), new java.awt.Color(0, 0, 102))); // NOI18N

        javax.swing.GroupLayout panelStatsNotePhaLayout = new javax.swing.GroupLayout(panelStatsNotePha);
        panelStatsNotePha.setLayout(panelStatsNotePhaLayout);
        panelStatsNotePhaLayout.setHorizontalGroup(panelStatsNotePhaLayout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 1085, Short.MAX_VALUE));
        panelStatsNotePhaLayout.setVerticalGroup(panelStatsNotePhaLayout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 621, Short.MAX_VALUE));

        scrollPaneStatsNotePha.setViewportView(panelStatsNotePha);

        tabbedPaneStats.addTab("Note Pharmacie", scrollPaneStatsNotePha);

        tabbedPaneAdministration.addTab("Statistiques", tabbedPaneStats);
        tabbedPaneStats.getAccessibleContext().setAccessibleName("");

        tabbedPaneGestionCpt.setTabPlacement(javax.swing.JTabbedPane.LEFT);
        tabbedPaneGestionCpt.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        tabbedPaneGestionCpt.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tabbedPaneGestionCptMouseClicked(evt);
            }
        });

        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Ajouter compte",
                javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION,
                new java.awt.Font("Tahoma", 1, 14), new java.awt.Color(0, 0, 102))); // NOI18N

        jPanel11.setName(""); // NOI18N

        lbAjoutCptNomCpt.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        lbAjoutCptNomCpt.setText("Nom :");

        txtAjoutCptNom.setName("Nom");
        txtAjoutCptNom.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtAjoutCptNomActionPerformed(evt);
            }
        });

        lbAjoutCptPrenomCpt.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        lbAjoutCptPrenomCpt.setText("Prenom :");

        txtAjoutCptPrenom.setName("Prenom");
        txtAjoutCptPrenom.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtAjoutCptPrenomActionPerformed(evt);
            }
        });

        lbAjoutCptEmailCpt.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        lbAjoutCptEmailCpt.setText("Adresse Email :");

        txtAjoutCptEmail.setName("Email");
        txtAjoutCptEmail.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtAjoutCptEmailActionPerformed(evt);
            }
        });

        lbAjoutCptTelCpt.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        lbAjoutCptTelCpt.setText("Num Tl :");

        txtAjoutCptTel.setName("Num Tl");

        lbAjoutCptMDPCpt.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        lbAjoutCptMDPCpt.setText("Mot de passe :");

        txtAjoutCptMDP.setText("");
        txtAjoutCptMDP.setName("Mot de passe");

        lbAjoutCptRMDPCpt.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        lbAjoutCptRMDPCpt.setText("Ressaisir mot de passe :");

        txtAjoutCptRMDP.setText("");
        txtAjoutCptMDP.setName("Ressaisir mot de passe");

        lbAjoutCptAddresseCpt.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        lbAjoutCptAddresseCpt.setText("Adresse :");

        txtAjoutCptAddresse.setColumns(20);
        txtAjoutCptAddresse.setRows(5);
        txtAjoutCptAddresse.setName("Adresse");
        jScrollPane10.setViewportView(txtAjoutCptAddresse);

        lbAjoutCptTypeCpt.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        lbAjoutCptTypeCpt.setText("Type de compte : ");

        comboBoxAjoutCptTypeCpt.setModel(
                new javax.swing.DefaultComboBoxModel(new String[] { "Administrateur", "Pharmacien", "Client" }));
        comboBoxAjoutCptTypeCpt.setSelectedIndex(-1);
        comboBoxAjoutCptTypeCpt.setToolTipText("");
        comboBoxAjoutCptTypeCpt.setName("Type Compte");
        comboBoxAjoutCptTypeCpt.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                comboBoxAjoutCptTypeCptActionPerformed(evt);
            }
        });

        btAjoutCptConfirmer.setText("Ajouter compte");
        btAjoutCptConfirmer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btAjoutCptConfirmerActionPerformed(evt);
            }
        });

        btAjoutCptAnuler.setText("Annuler");
        btAjoutCptAnuler.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btAjoutCptAnulerActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(jPanel11Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel11Layout.createSequentialGroup().addGap(69, 69, 69).addGroup(jPanel11Layout
                        .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(lbAjoutCptRMDPCpt).addComponent(lbAjoutCptTypeCpt)
                        .addComponent(lbAjoutCptAddresseCpt)
                        .addComponent(lbAjoutCptNomCpt, javax.swing.GroupLayout.PREFERRED_SIZE, 114,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(lbAjoutCptPrenomCpt).addComponent(lbAjoutCptEmailCpt)
                        .addComponent(lbAjoutCptTelCpt).addComponent(lbAjoutCptMDPCpt)).addGap(18, 18, 18)
                        .addGroup(jPanel11Layout
                                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(jScrollPane10, javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(comboBoxAjoutCptTypeCpt, javax.swing.GroupLayout.Alignment.TRAILING,
                                        0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(txtAjoutCptRMDP)
                                .addComponent(txtAjoutCptMDP, javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(txtAjoutCptTel, javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(txtAjoutCptEmail, javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(txtAjoutCptPrenom, javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(txtAjoutCptNom, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addGap(0, 603, Short.MAX_VALUE))
                .addGroup(jPanel11Layout.createSequentialGroup().addGap(172, 172, 172)
                        .addComponent(btAjoutCptConfirmer)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btAjoutCptAnuler, javax.swing.GroupLayout.PREFERRED_SIZE, 125,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
        jPanel11Layout.setVerticalGroup(jPanel11Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel11Layout.createSequentialGroup().addGap(32, 32, 32)
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(lbAjoutCptNomCpt, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(txtAjoutCptNom, javax.swing.GroupLayout.PREFERRED_SIZE, 25,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(lbAjoutCptPrenomCpt, javax.swing.GroupLayout.PREFERRED_SIZE, 20,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(txtAjoutCptPrenom, javax.swing.GroupLayout.PREFERRED_SIZE, 25,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(lbAjoutCptEmailCpt).addComponent(txtAjoutCptEmail,
                                        javax.swing.GroupLayout.PREFERRED_SIZE, 25,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(lbAjoutCptTelCpt).addComponent(txtAjoutCptTel,
                                        javax.swing.GroupLayout.PREFERRED_SIZE, 25,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(12, 12, 12)
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(lbAjoutCptMDPCpt).addComponent(txtAjoutCptMDP,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(20, 20, 20)
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(lbAjoutCptRMDPCpt).addComponent(txtAjoutCptRMDP,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(lbAjoutCptAddresseCpt)
                                .addGroup(jPanel11Layout.createSequentialGroup()
                                        .addComponent(jScrollPane10, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addGroup(jPanel11Layout
                                                .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                .addComponent(comboBoxAjoutCptTypeCpt,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE, 25,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(lbAjoutCptTypeCpt))))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 89, Short.MAX_VALUE)
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(btAjoutCptConfirmer).addComponent(btAjoutCptAnuler))
                        .addGap(66, 66, 66)));

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
                jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jPanel11,
                        javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
        jPanel6Layout.setVerticalGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel6Layout.createSequentialGroup()
                        .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE)));

        javax.swing.GroupLayout panelAjoutCptLayout = new javax.swing.GroupLayout(panelAjoutCpt);
        panelAjoutCpt.setLayout(panelAjoutCptLayout);
        panelAjoutCptLayout.setHorizontalGroup(
                panelAjoutCptLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(
                        jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                        Short.MAX_VALUE));
        panelAjoutCptLayout.setVerticalGroup(panelAjoutCptLayout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelAjoutCptLayout.createSequentialGroup()
                        .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE)));

        tabbedPaneGestionCpt.addTab("Ajouter compte", panelAjoutCpt);

        jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Modifier Compte",
                javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION,
                new java.awt.Font("Tahoma", 1, 14), new java.awt.Color(0, 0, 102))); // NOI18N

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Filtrer par",
                javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
                javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12),
                new java.awt.Color(0, 0, 0))); // NOI18N
        jPanel2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel1.setText("Nom :");

        txtModCptNom.addCaretListener(new javax.swing.event.CaretListener() {
            public void caretUpdate(javax.swing.event.CaretEvent evt) {
                txtModCptNomCaretUpdate(evt);
            }
        });

        jLabel2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel2.setText("Prenom :");
        jLabel2.setMaximumSize(new java.awt.Dimension(38, 17));
        jLabel2.setMinimumSize(new java.awt.Dimension(38, 17));

        jLabel3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel3.setText("Type :");
        jLabel3.setMaximumSize(new java.awt.Dimension(38, 17));
        jLabel3.setMinimumSize(new java.awt.Dimension(38, 17));

        txtModCptPrenom.setName("Prnom");
        txtModCptPrenom.addCaretListener(new javax.swing.event.CaretListener() {
            public void caretUpdate(javax.swing.event.CaretEvent evt) {
                txtModCptPrenomCaretUpdate(evt);
            }
        });

        comboBoxModCptType.setModel(new javax.swing.DefaultComboBoxModel(
                new String[] { "Tous", "Administrateur", "Pharmacien", "Client" }));
        comboBoxModCptType.setToolTipText("");
        comboBoxModCptType.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                comboBoxModCptTypeItemStateChanged(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout
                .setHorizontalGroup(
                        jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(
                                        jPanel2Layout.createSequentialGroup().addContainerGap()
                                                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 89,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(txtModCptNom, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                        229, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addGap(18, 18, 18)
                                                .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 114,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addGap(18, 18, 18)
                                                .addComponent(txtModCptPrenom,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE, 230,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 114,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(comboBoxModCptType,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE, 170,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE,
                                                        Short.MAX_VALUE)));
        jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap().addGroup(jPanel2Layout
                        .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(txtModCptNom, javax.swing.GroupLayout.PREFERRED_SIZE, 25,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(txtModCptPrenom, javax.swing.GroupLayout.PREFERRED_SIZE, 25,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(comboBoxModCptType, javax.swing.GroupLayout.PREFERRED_SIZE, 25,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

        txtModCptNom.setName("Nom");

        tableModCpt.setModel(new javax.swing.table.DefaultTableModel(new Object[][] {

        }, new String[] { "ID", "Nom", "Prenom", "Type", "Option" }) {
            boolean[] canEdit = new boolean[] { false, false, false, false, false };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit[columnIndex];
            }
        });
        tableModCpt = makeTable(
                pidev.tunipharma.utils.GUIUtil.getModel(new Object[][] { { "", "", "", "", "" } },
                        new String[] { "ID", "Nom", "Prenom", "Type", "Option" }),
                4, TableButton.AFFFICHER_SUPPRIMER);
        tableModCpt.setName("tableModCpt");
        scrollPaneTableModCpt.setViewportView(tableModCpt);

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(jPanel8Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel8Layout.createSequentialGroup().addContainerGap()
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(scrollPaneTableModCpt).addComponent(jPanel2,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        Short.MAX_VALUE))
                        .addContainerGap()));
        jPanel8Layout.setVerticalGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel8Layout.createSequentialGroup().addContainerGap()
                        .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(scrollPaneTableModCpt, javax.swing.GroupLayout.DEFAULT_SIZE, 498,
                                Short.MAX_VALUE)
                        .addContainerGap()));

        javax.swing.GroupLayout panelModCptLayout = new javax.swing.GroupLayout(panelModCpt);
        panelModCpt.setLayout(panelModCptLayout);
        panelModCptLayout
                .setHorizontalGroup(panelModCptLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                panelModCptLayout.createSequentialGroup().addContainerGap()
                                        .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addContainerGap()));
        panelModCptLayout
                .setVerticalGroup(panelModCptLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                panelModCptLayout.createSequentialGroup().addContainerGap().addComponent(jPanel8,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        Short.MAX_VALUE)));

        tabbedPaneGestionCpt.addTab("Modifier compte", panelModCpt);

        jPanel16.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Inscriptions",
                javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION,
                new java.awt.Font("Tahoma", 1, 14), new java.awt.Color(0, 0, 102))); // NOI18N

        tableNouvInscriCpt.setModel(new javax.swing.table.DefaultTableModel(new Object[][] {

        }, new String[] { "ID", "Non", "Prenom", "Date d'inscription", "Option" }));
        tableNouvInscriCpt.setToolTipText("");
        tableNouvInscriCpt = makeTable(
                pidev.tunipharma.utils.GUIUtil.getModel(new Object[][] { { "", "", "", "", "" } },
                        new String[] { "ID", "Nom", "Prenom", "Type", "Option" }),
                4, TableButton.AFFFICHER_ACCEPTER_REFUSER);
        tableNouvInscriCpt.setName("tableNouvInscriCpt");
        jScrollPane9.setViewportView(tableNouvInscriCpt);

        javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);
        jPanel16.setLayout(jPanel16Layout);
        jPanel16Layout
                .setHorizontalGroup(
                        jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel16Layout
                                        .createSequentialGroup().addContainerGap().addComponent(jScrollPane9,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, 1078, Short.MAX_VALUE)
                                        .addContainerGap()));
        jPanel16Layout.setVerticalGroup(jPanel16Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel16Layout.createSequentialGroup().addContainerGap()
                        .addComponent(jScrollPane9, javax.swing.GroupLayout.DEFAULT_SIZE, 588, Short.MAX_VALUE)
                        .addContainerGap()));

        javax.swing.GroupLayout panelNouvInscritLayout = new javax.swing.GroupLayout(panelNouvInscrit);
        panelNouvInscrit.setLayout(panelNouvInscritLayout);
        panelNouvInscritLayout.setHorizontalGroup(
                panelNouvInscritLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(
                        jPanel16, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                        Short.MAX_VALUE));
        panelNouvInscritLayout.setVerticalGroup(
                panelNouvInscritLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(
                        jPanel16, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                        Short.MAX_VALUE));

        tabbedPaneGestionCpt.addTab("Nouvelles inscriptions", panelNouvInscrit);

        tabbedPaneAdministration.addTab("Gestion des comptes", tabbedPaneGestionCpt);

        tabbedPaneGestionPha.setTabPlacement(javax.swing.JTabbedPane.LEFT);
        tabbedPaneGestionPha.setToolTipText("");
        tabbedPaneGestionPha.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        tabbedPaneGestionPha.setName(""); // NOI18N
        tabbedPaneGestionPha.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tabbedPaneGestionPhaMouseClicked(evt);
            }
        });

        scrollPaneAjoutPha.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Ajouter Pharmacie",
                javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION,
                new java.awt.Font("Tahoma", 1, 14), new java.awt.Color(0, 0, 102))); // NOI18N
        scrollPaneAjoutPha.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        btAjoutPhaAnnuler.setText("Annuler");
        btAjoutPhaAnnuler.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btAjoutPhaAnnulerActionPerformed(evt);
            }
        });

        btAjoutPhaConfirmer.setText("Confirmer ajout");
        btAjoutPhaConfirmer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btAjoutPhaConfirmerActionPerformed(evt);
            }
        });

        jLabel34.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel34.setText("Nom :");

        jLabel35.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel35.setText("Adresse :");
        jLabel35.setMaximumSize(new java.awt.Dimension(38, 17));
        jLabel35.setMinimumSize(new java.awt.Dimension(38, 17));

        jLabel36.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel36.setText("Email :");
        jLabel36.setMaximumSize(new java.awt.Dimension(38, 17));
        jLabel36.setMinimumSize(new java.awt.Dimension(38, 17));

        jLabel37.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel37.setText("Num Tl :");
        jLabel37.setMaximumSize(new java.awt.Dimension(38, 17));
        jLabel37.setMinimumSize(new java.awt.Dimension(38, 17));

        txtAjoutPhaEmail.setName("Email");
        txtAjoutPhaEmail.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtAjoutPhaEmailActionPerformed(evt);
            }
        });

        jLabel38.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel38.setText("Responsable :");
        jLabel38.setMaximumSize(new java.awt.Dimension(38, 17));
        jLabel38.setMinimumSize(new java.awt.Dimension(38, 17));

        jLabel39.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel39.setText("Num Fax :");
        jLabel39.setMaximumSize(new java.awt.Dimension(38, 17));
        jLabel39.setMinimumSize(new java.awt.Dimension(38, 17));

        txtAjoutPhaNom.setName("Nom");
        txtAjoutPhaNom.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtAjoutPhaNomActionPerformed(evt);
            }
        });

        txtAjoutPhaFax.setName("Num Fax");
        txtAjoutPhaFax.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtAjoutPhaFaxActionPerformed(evt);
            }
        });

        txtAjoutPhaTel.setName("Num Tl");
        txtAjoutPhaTel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtAjoutPhaTelActionPerformed(evt);
            }
        });

        txtAjoutPhaAddresse.setColumns(20);
        txtAjoutPhaAddresse.setRows(5);
        txtAjoutPhaAddresse.setName("Adresse");
        jScrollPane12.setViewportView(txtAjoutPhaAddresse);

        comboBoxAjoutPhaResponsable.setName("Responsable");

        jLabel40.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel40.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel40.setText("Jours de garde");

        jLabel45.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel45.setText("Gouvernorat : ");
        jLabel45.setMaximumSize(new java.awt.Dimension(38, 17));
        jLabel45.setMinimumSize(new java.awt.Dimension(38, 17));

        jLabel46.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel46.setText("Ville :");
        jLabel46.setMaximumSize(new java.awt.Dimension(38, 17));
        jLabel46.setMinimumSize(new java.awt.Dimension(38, 17));

        comboBoxAjoutPhaVille.setName("Ville");

        comboBoxAjoutPhaGouv.setName("Gouvernorat");

        tableJourDeGarde.setModel(new javax.swing.table.DefaultTableModel(new Object[][] {

        }, new String[] { "Jour", "Options" }) {
            boolean[] canEdit = new boolean[] { false, false };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit[columnIndex];
            }
        });
        tableJourDeGarde = makeTable(
                pidev.tunipharma.utils.GUIUtil.getModel(new Object[][] {}, new String[] { "Jour", "Options" }), 1,
                TableButton.SUPPRIMER);
        tableJourDeGarde.setName("tableJourDeGarde");
        jScrollPane2.setViewportView(tableJourDeGarde);

        btAjoutJourGarde.setText("Ajouter garde");
        btAjoutJourGarde.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btAjoutJourGardeActionPerformed(evt);
            }
        });

        jLabel44.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel44.setText("Longitude : ");
        jLabel44.setMaximumSize(new java.awt.Dimension(38, 17));
        jLabel44.setMinimumSize(new java.awt.Dimension(38, 17));

        txtAjoutPhaLongitude.setName("Longitude Google Map");

        jLabel47.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel47.setText("Latitude :");
        jLabel47.setMaximumSize(new java.awt.Dimension(38, 17));
        jLabel47.setMinimumSize(new java.awt.Dimension(38, 17));

        txtAjoutPhaLatitude.setName("Latitude Google Map");

        comboBoxAjoutPhaType.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Jour", "Nuit" }));
        comboBoxAjoutPhaType.setSelectedIndex(-1);
        comboBoxAjoutPhaType.setName("Type de pharmacie");

        jLabel48.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel48.setText("Type : ");
        jLabel48.setMaximumSize(new java.awt.Dimension(38, 17));
        jLabel48.setMinimumSize(new java.awt.Dimension(38, 17));

        javax.swing.GroupLayout panelAjoutPhaLayout = new javax.swing.GroupLayout(panelAjoutPha);
        panelAjoutPha.setLayout(panelAjoutPhaLayout);
        panelAjoutPhaLayout.setHorizontalGroup(panelAjoutPhaLayout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelAjoutPhaLayout.createSequentialGroup().addGroup(panelAjoutPhaLayout
                        .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(panelAjoutPhaLayout.createSequentialGroup().addGap(34, 34, 34)
                                .addGroup(panelAjoutPhaLayout
                                        .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addGroup(panelAjoutPhaLayout.createSequentialGroup()
                                                .addComponent(jLabel44, javax.swing.GroupLayout.PREFERRED_SIZE, 114,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addGap(68, 68, 68).addComponent(txtAjoutPhaLongitude))
                                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelAjoutPhaLayout
                                                .createSequentialGroup().addGap(0, 0, Short.MAX_VALUE)
                                                .addGroup(panelAjoutPhaLayout
                                                        .createParallelGroup(
                                                                javax.swing.GroupLayout.Alignment.TRAILING, false)
                                                        .addComponent(jLabel37,
                                                                javax.swing.GroupLayout.Alignment.LEADING,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE, 114,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addGroup(panelAjoutPhaLayout.createSequentialGroup()
                                                                .addComponent(jLabel35,
                                                                        javax.swing.GroupLayout.PREFERRED_SIZE, 114,
                                                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                .addGap(68, 68, 68)))
                                                .addGroup(panelAjoutPhaLayout
                                                        .createParallelGroup(
                                                                javax.swing.GroupLayout.Alignment.LEADING, false)
                                                        .addComponent(jScrollPane12).addComponent(txtAjoutPhaTel)))
                                        .addGroup(panelAjoutPhaLayout.createSequentialGroup()
                                                .addGroup(panelAjoutPhaLayout
                                                        .createParallelGroup(
                                                                javax.swing.GroupLayout.Alignment.LEADING)
                                                        .addComponent(jLabel45,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE, 114,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addComponent(jLabel46,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE, 114,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addComponent(jLabel39,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE, 114,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                                .addGap(68, 68, 68)
                                                .addGroup(panelAjoutPhaLayout
                                                        .createParallelGroup(
                                                                javax.swing.GroupLayout.Alignment.LEADING)
                                                        .addComponent(txtAjoutPhaFax)
                                                        .addComponent(comboBoxAjoutPhaVille, 0,
                                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                Short.MAX_VALUE)
                                                        .addComponent(comboBoxAjoutPhaGouv, 0,
                                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                Short.MAX_VALUE)))
                                        .addGroup(panelAjoutPhaLayout.createSequentialGroup()
                                                .addGroup(panelAjoutPhaLayout
                                                        .createParallelGroup(
                                                                javax.swing.GroupLayout.Alignment.LEADING)
                                                        .addComponent(jLabel36,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE, 114,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addComponent(jLabel38,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE, 114,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addComponent(jLabel34,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE, 114,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                                .addGap(68, 68, 68)
                                                .addGroup(panelAjoutPhaLayout
                                                        .createParallelGroup(
                                                                javax.swing.GroupLayout.Alignment.LEADING)
                                                        .addComponent(txtAjoutPhaNom).addComponent(txtAjoutPhaEmail)
                                                        .addComponent(comboBoxAjoutPhaResponsable, 0,
                                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                Short.MAX_VALUE)))
                                        .addGroup(panelAjoutPhaLayout.createSequentialGroup()
                                                .addComponent(jLabel47, javax.swing.GroupLayout.PREFERRED_SIZE, 114,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addGap(68, 68, 68).addComponent(txtAjoutPhaLatitude))
                                        .addGroup(panelAjoutPhaLayout.createSequentialGroup()
                                                .addComponent(jLabel48, javax.swing.GroupLayout.PREFERRED_SIZE, 114,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addGap(68, 68, 68).addComponent(comboBoxAjoutPhaType, 0,
                                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                                .addGap(78, 78, 78)
                                .addGroup(panelAjoutPhaLayout
                                        .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelAjoutPhaLayout
                                                .createSequentialGroup()
                                                .addComponent(dateGarde, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                        222, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(btAjoutJourGarde))
                                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 0,
                                                Short.MAX_VALUE)
                                        .addComponent(jLabel40, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                        .addGroup(panelAjoutPhaLayout.createSequentialGroup().addGap(285, 285, 285)
                                .addComponent(btAjoutPhaConfirmer, javax.swing.GroupLayout.PREFERRED_SIZE, 135,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(76, 76, 76).addComponent(btAjoutPhaAnnuler,
                                        javax.swing.GroupLayout.PREFERRED_SIZE, 135,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addContainerGap(233, Short.MAX_VALUE)));
        panelAjoutPhaLayout.setVerticalGroup(panelAjoutPhaLayout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelAjoutPhaLayout.createSequentialGroup().addGroup(panelAjoutPhaLayout
                        .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(panelAjoutPhaLayout.createSequentialGroup().addContainerGap()
                                .addGroup(panelAjoutPhaLayout
                                        .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jLabel34, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(txtAjoutPhaNom, javax.swing.GroupLayout.PREFERRED_SIZE, 25,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(18, 18, 18)
                                .addGroup(panelAjoutPhaLayout
                                        .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jLabel38, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(comboBoxAjoutPhaResponsable,
                                                javax.swing.GroupLayout.PREFERRED_SIZE, 25,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(panelAjoutPhaLayout
                                        .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jLabel36, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(txtAjoutPhaEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 25,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(panelAjoutPhaLayout
                                        .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jLabel37, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(txtAjoutPhaTel, javax.swing.GroupLayout.PREFERRED_SIZE, 25,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(panelAjoutPhaLayout
                                        .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jLabel39, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(txtAjoutPhaFax, javax.swing.GroupLayout.PREFERRED_SIZE, 25,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(panelAjoutPhaLayout
                                        .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jLabel45, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(comboBoxAjoutPhaGouv, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(panelAjoutPhaLayout
                                        .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jLabel46, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(comboBoxAjoutPhaVille, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(panelAjoutPhaLayout
                                        .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(jScrollPane12, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(jLabel35, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(panelAjoutPhaLayout
                                        .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(txtAjoutPhaLongitude, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                25, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(jLabel44, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(panelAjoutPhaLayout
                                        .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jLabel47, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(txtAjoutPhaLatitude, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                25, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(panelAjoutPhaLayout
                                        .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jLabel48, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(comboBoxAjoutPhaType, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(panelAjoutPhaLayout.createSequentialGroup().addGap(14, 14, 14)
                                .addComponent(jLabel40, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(panelAjoutPhaLayout
                                        .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                        .addComponent(btAjoutJourGarde).addComponent(dateGarde,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 239,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(29, 29, 29)
                        .addGroup(
                                panelAjoutPhaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(btAjoutPhaAnnuler).addComponent(btAjoutPhaConfirmer))
                        .addContainerGap(62, Short.MAX_VALUE)));

        scrollPaneAjoutPha.setViewportView(panelAjoutPha);

        tabbedPaneGestionPha.addTab("Ajouter Pharmacie", scrollPaneAjoutPha);

        scrollPaneModPha.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "",
                javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION,
                new java.awt.Font("Tahoma", 1, 14), new java.awt.Color(0, 0, 102))); // NOI18N

        panelModPha.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Information du Pharmacie",
                javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION,
                new java.awt.Font("Tahoma", 1, 14), new java.awt.Color(0, 0, 102))); // NOI18N

        jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Filtrer par :",
                javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
                javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

        jLabel41.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel41.setText("Type :");

        jLabel42.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel42.setText("Gouvernorat:");

        jLabel43.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel43.setText("Ville:");

        comboBoxModPhaGouv.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        comboBoxModPhaGouv.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                comboBoxModPhaGouvItemStateChanged(evt);
            }
        });
        comboBoxModPhaGouv.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                comboBoxModPhaGouvActionPerformed(evt);
            }
        });

        comboBoxModPhaType.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Tous", "Jour", "Nuit" }));
        comboBoxModPhaType.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        comboBoxModPhaType.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                comboBoxModPhaTypeItemStateChanged(evt);
            }
        });

        comboBoxModPhaVille.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        comboBoxModPhaVille.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                comboBoxModPhaVilleItemStateChanged(evt);
            }
        });

        txtModPhaNom.addCaretListener(new javax.swing.event.CaretListener() {
            public void caretUpdate(javax.swing.event.CaretEvent evt) {
                txtModPhaNomCaretUpdate(evt);
            }
        });

        jLabel4.setText("Nom : ");

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(jPanel9Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel9Layout.createSequentialGroup().addContainerGap(26, Short.MAX_VALUE)
                        .addComponent(jLabel4).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtModPhaNom, javax.swing.GroupLayout.PREFERRED_SIZE, 157,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel42, javax.swing.GroupLayout.PREFERRED_SIZE, 100,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(comboBoxModPhaGouv, javax.swing.GroupLayout.PREFERRED_SIZE, 200,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel43, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(comboBoxModPhaVille, javax.swing.GroupLayout.PREFERRED_SIZE, 200,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel41, javax.swing.GroupLayout.PREFERRED_SIZE, 61,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(comboBoxModPhaType, javax.swing.GroupLayout.PREFERRED_SIZE, 140,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap()));
        jPanel9Layout.setVerticalGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel9Layout.createSequentialGroup().addContainerGap()
                        .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel41, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel42, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel43, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(comboBoxModPhaType, javax.swing.GroupLayout.PREFERRED_SIZE, 25,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(comboBoxModPhaGouv, javax.swing.GroupLayout.PREFERRED_SIZE, 25,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(comboBoxModPhaVille, javax.swing.GroupLayout.PREFERRED_SIZE, 25,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(txtModPhaNom, javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel4))
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

        tableModPha.setModel(new javax.swing.table.DefaultTableModel(new Object[][] {

        }, new String[] { "ID", "Non", "Responsable", "Gouvernement", "Ville", "Type", "Option" }));
        tableModPha.setToolTipText("");
        tableModPha = makeTable(
                pidev.tunipharma.utils.GUIUtil.getModel(new Object[][] { { "", "", "", "", "", "", "" } },
                        new String[] { "ID", "Non", "Responsable", "Gouvernement", "Ville", "Type", "Option" }),
                6, TableButton.AFFFICHER_SUPPRIMER);
        tableModPha.setName("tableModPha");
        jScrollPane11.setViewportView(tableModPha);

        javax.swing.GroupLayout panelModPhaLayout = new javax.swing.GroupLayout(panelModPha);
        panelModPha.setLayout(panelModPhaLayout);
        panelModPhaLayout
                .setHorizontalGroup(panelModPhaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(panelModPhaLayout.createSequentialGroup().addContainerGap(13, Short.MAX_VALUE)
                                .addGroup(panelModPhaLayout
                                        .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jScrollPane11))
                                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
        panelModPhaLayout.setVerticalGroup(panelModPhaLayout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelModPhaLayout.createSequentialGroup().addContainerGap()
                        .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane11).addContainerGap()));

        scrollPaneModPha.setViewportView(panelModPha);

        tabbedPaneGestionPha.addTab("Modifier Pharmacie", scrollPaneModPha);

        panelDemandes.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Demandes des Evenements",
                javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION,
                new java.awt.Font("Tahoma", 1, 14), new java.awt.Color(0, 0, 102))); // NOI18N

        tableDemandesPha.setModel(new javax.swing.table.DefaultTableModel(new Object[][] {

        }, new String[] { "ID", "Pharmacie Hote", "Date Demande", "Date/Horaire Evenement", "Option" }));
        tableDemandesPha.setName("tableDemandesPha");
        tableDemandesPha.setToolTipText("");
        tableDemandesPha = makeTable(
                pidev.tunipharma.utils.GUIUtil.getModel(new Object[][] { { "", "", "", "", "" } }, new String[] {
                        "ID", "Pharmacie Hote", "Date Demande", "Date/Horaire Evenement", "Option" }),
                4, TableButton.AFFFICHER_ACCEPTER_REFUSER);
        tableDemandesPha.setName("tableDemandesPha");
        scrollPaneDemandes.setViewportView(tableDemandesPha);

        javax.swing.GroupLayout panelDemandesLayout = new javax.swing.GroupLayout(panelDemandes);
        panelDemandes.setLayout(panelDemandesLayout);
        panelDemandesLayout.setHorizontalGroup(
                panelDemandesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(panelDemandesLayout
                                .createSequentialGroup().addContainerGap().addComponent(scrollPaneDemandes,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, 1087, Short.MAX_VALUE)
                                .addContainerGap()));
        panelDemandesLayout.setVerticalGroup(
                panelDemandesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(
                        scrollPaneDemandes, javax.swing.GroupLayout.DEFAULT_SIZE, 612, Short.MAX_VALUE));

        tabbedPaneGestionPha.addTab("Les demandes", panelDemandes);

        panelAjoutService.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Ajouter Service",
                javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION,
                new java.awt.Font("Tahoma", 1, 14), new java.awt.Color(0, 0, 102))); // NOI18N

        txtMaPhaAjoutSrvNom.setName("txtnom"); // NOI18N
        txtMaPhaAjoutSrvNom.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtMaPhaAjoutSrvNomActionPerformed(evt);
            }
        });

        txtMaPhaAjoutSrvDesc.setColumns(20);
        txtMaPhaAjoutSrvDesc.setRows(5);
        txtMaPhaAjoutSrvDesc.setName("txtadresse"); // NOI18N
        jScrollPane14.setViewportView(txtMaPhaAjoutSrvDesc);

        jLabel49.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel49.setText("Description service : ");

        jLabel50.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel50.setText("Nom service : ");

        btMaPhaAjoutSrvConfirmer.setText("Confirmer ajout service");
        btMaPhaAjoutSrvConfirmer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btMaPhaAjoutSrvConfirmerActionPerformed(evt);
            }
        });

        buttonMaPhaAjoutSrvAnnuler.setText("Annuler");

        javax.swing.GroupLayout panelAjoutServiceLayout = new javax.swing.GroupLayout(panelAjoutService);
        panelAjoutService.setLayout(panelAjoutServiceLayout);
        panelAjoutServiceLayout.setHorizontalGroup(panelAjoutServiceLayout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelAjoutServiceLayout
                        .createSequentialGroup().addContainerGap(52, Short.MAX_VALUE)
                        .addGroup(panelAjoutServiceLayout
                                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addGroup(panelAjoutServiceLayout.createSequentialGroup()
                                        .addComponent(jLabel49, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED))
                                .addGroup(panelAjoutServiceLayout.createSequentialGroup()
                                        .addComponent(jLabel50, javax.swing.GroupLayout.PREFERRED_SIZE, 114,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(43, 43, 43)))
                        .addGroup(panelAjoutServiceLayout
                                .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(txtMaPhaAjoutSrvNom)
                                .addComponent(jScrollPane14, javax.swing.GroupLayout.Alignment.LEADING))
                        .addGap(660, 660, 660))
                .addGroup(panelAjoutServiceLayout.createSequentialGroup()
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(btMaPhaAjoutSrvConfirmer).addGap(18, 18, 18)
                        .addComponent(buttonMaPhaAjoutSrvAnnuler, javax.swing.GroupLayout.PREFERRED_SIZE, 180,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
        panelAjoutServiceLayout.setVerticalGroup(panelAjoutServiceLayout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelAjoutServiceLayout.createSequentialGroup().addGap(52, 52, 52)
                        .addGroup(panelAjoutServiceLayout
                                .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel50, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(txtMaPhaAjoutSrvNom, javax.swing.GroupLayout.PREFERRED_SIZE, 25,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(panelAjoutServiceLayout
                                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel49, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jScrollPane14, javax.swing.GroupLayout.PREFERRED_SIZE, 113,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(54, 54, 54)
                        .addGroup(panelAjoutServiceLayout
                                .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(btMaPhaAjoutSrvConfirmer).addComponent(buttonMaPhaAjoutSrvAnnuler))
                        .addContainerGap(320, Short.MAX_VALUE)));

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout
                .setHorizontalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(panelAjoutService, javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
        jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(panelAjoutService, javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));

        tabbedPaneGestionPha.addTab("Ajouter des services", jPanel1);

        tabbedPaneAdministration.addTab("Gestion des pharmacies", tabbedPaneGestionPha);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                layout.createSequentialGroup().addContainerGap()
                                        .addComponent(tabbedPaneAdministration,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, 1276, Short.MAX_VALUE)
                                        .addContainerGap()));
        layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                layout.createSequentialGroup().addContainerGap()
                                        .addComponent(tabbedPaneAdministration,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, 682, Short.MAX_VALUE)
                                        .addContainerGap()));

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void txtAjoutPhaEmailActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtAjoutPhaEmailActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtAjoutPhaEmailActionPerformed

    private void txtAjoutPhaNomActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtAjoutPhaNomActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtAjoutPhaNomActionPerformed

    private void txtAjoutPhaFaxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtAjoutPhaFaxActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtAjoutPhaFaxActionPerformed

    private void txtAjoutPhaTelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtAjoutPhaTelActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtAjoutPhaTelActionPerformed

    // <editor-fold defaultstate="collapsed" desc="Formulaire Ajout Compte">
    private void btAjoutCptConfirmerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btAjoutCptConfirmerActionPerformed
        // TODO add your handling code here:
        if (GUIUtil.checkForm(panelAjoutCpt)) {
            //Ajout du compte dans la base de donne
            String pass = String.valueOf(txtAjoutCptMDP.getPassword(), 0, txtAjoutCptMDP.getPassword().length);
            Compte cpt = new Compte(-1, txtAjoutCptNom.getText(), txtAjoutCptPrenom.getText(),
                    txtAjoutCptAddresse.getText(), txtAjoutCptEmail.getText(), pass,
                    Integer.parseInt(txtAjoutCptTel.getText()), comboBoxAjoutCptTypeCpt.getSelectedIndex() + 1,
                    true);
            ComptesDAO.getInstance().create(cpt);
            //GUIUtil.showMsgBox(cpt.toString());
            GUIUtil.showMsgBox(this, "Compte ajout avec succ !");
            GUIUtil.resetForm(panelAjoutCpt);
        }
    }//GEN-LAST:event_btAjoutCptConfirmerActionPerformed
     // </editor-fold>

    private void comboBoxAjoutCptTypeCptActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboBoxAjoutCptTypeCptActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_comboBoxAjoutCptTypeCptActionPerformed

    private void txtAjoutCptEmailActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtAjoutCptEmailActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtAjoutCptEmailActionPerformed

    private void txtAjoutCptPrenomActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtAjoutCptPrenomActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtAjoutCptPrenomActionPerformed

    // <editor-fold defaultstate="collapsed" desc="Formulaire Ajout Compte">
    private void txtAjoutCptNomActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtAjoutCptNomActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtAjoutCptNomActionPerformed

    private void btAjoutCptAnulerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btAjoutCptAnulerActionPerformed
        // TODO add your handling code here:
        if (GUIUtil.showConfBox("Voulez vous reinitialiser les champs ?")) {
            GUIUtil.resetForm(panelAjoutCpt);
            //            GUIUtil.showMsgBox("Done");
        }
    }//GEN-LAST:event_btAjoutCptAnulerActionPerformed

    private void btAjoutPhaConfirmerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btAjoutPhaConfirmerActionPerformed
        // TODO add your handling code here:
        if (GUIUtil.checkForm(panelAjoutPha)) {
            //Ajout du compte dans la base de donne
            System.out.println("[Log] Gouvernorat et ville choisi : "
                    + ((Gouvernorat) comboBoxModPhaGouv.getSelectedItem()).getNom_gouv() + " - "
                    + ((Ville) comboBoxModPhaVille.getSelectedItem()));
            Pharmacie pha = new Pharmacie(-1, ((Compte) comboBoxAjoutPhaResponsable.getSelectedItem()).getId_cpt(),
                    txtAjoutPhaNom.getText(), txtAjoutPhaAddresse.getText(),
                    Integer.parseInt(txtAjoutPhaTel.getText()), Integer.parseInt(txtAjoutPhaFax.getText()),
                    txtAjoutPhaLatitude.getText(), txtAjoutPhaLongitude.getText(), txtAjoutPhaEmail.getText(),
                    comboBoxAjoutPhaType.getSelectedIndex() + 1,
                    ((Ville) comboBoxAjoutPhaVille.getSelectedItem()).getId_ville(),
                    ((Gouvernorat) comboBoxAjoutPhaGouv.getSelectedItem()).getId_gouv());
            //Ajout dans la base de donne de la nouvelle pharamacie
            PharmaciesDAO.getInstance().create(pha);
            //Ajout de jours de garde dans la base de donnes
            GUIUtil.addAllDateToDB(tableJourDeGarde, pha.getId_pha());
            //Reinitialisation des champs de la formulaire
            GUIUtil.resetForm(panelAjoutPha);
            // Renitialisation de champs des jour de garde
            GUIUtil.remAllRows(tableJourDeGarde);
            ((JTextField) dateGarde.getDateEditor().getUiComponent()).setText("");
            //Regeneration de la liste des responsable
            GUIUtil.fillPharmacienCB(comboBoxAjoutPhaResponsable);
            System.out.println("Pharmacie " + pha + " Ajout !!");
        }
    }//GEN-LAST:event_btAjoutPhaConfirmerActionPerformed

    private void btAjoutPhaAnnulerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btAjoutPhaAnnulerActionPerformed
        // TODO add your handling code here:
        if (GUIUtil.showConfBox("Voulez vous reinitialiser les champs ?")) {
            GUIUtil.resetForm(panelAjoutPha);
            // Renitialisation de champs des jour de garde
            GUIUtil.remAllRows(tableJourDeGarde);
            ((JTextField) dateGarde.getDateEditor().getUiComponent()).setText("");
            //Regeneration de la liste des responsable
            GUIUtil.fillPharmacienCB(comboBoxAjoutPhaResponsable);
        }
    }//GEN-LAST:event_btAjoutPhaAnnulerActionPerformed

    private void comboBoxModPhaGouvActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboBoxModPhaGouvActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_comboBoxModPhaGouvActionPerformed
     // </editor-fold>

    // <editor-fold defaultstate="collapsed" desc="Table Modifier Comptes ">
    private void txtModCptNomCaretUpdate(javax.swing.event.CaretEvent evt) {//GEN-FIRST:event_txtModCptNomCaretUpdate
        // TODO add your handling code here:
        fillTableModCpt(comboBoxModCptType.getSelectedIndex(), txtModCptNom.getText(), txtModCptPrenom.getText());
    }//GEN-LAST:event_txtModCptNomCaretUpdate

    private void txtModCptPrenomCaretUpdate(javax.swing.event.CaretEvent evt) {//GEN-FIRST:event_txtModCptPrenomCaretUpdate
        // TODO add your handling code here:
        fillTableModCpt(comboBoxModCptType.getSelectedIndex(), txtModCptNom.getText(), txtModCptPrenom.getText());
    }//GEN-LAST:event_txtModCptPrenomCaretUpdate

    private void comboBoxModCptTypeItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_comboBoxModCptTypeItemStateChanged
        // TODO add your handling code here:
        fillTableModCpt(comboBoxModCptType.getSelectedIndex(), txtModCptNom.getText(), txtModCptPrenom.getText());
    }//GEN-LAST:event_comboBoxModCptTypeItemStateChanged

    private void tabbedPaneGestionCptMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tabbedPaneGestionCptMouseClicked
        // TODO add your handling code here:
        txtModCptNom.setText("");
        txtModCptPrenom.setText("");
        comboBoxModCptType.setSelectedIndex(-1);
        fillTableModCpt(0, "", "");
        fillTableDmdCpt();
    }//GEN-LAST:event_tabbedPaneGestionCptMouseClicked

    private void fillTableModCpt(int type, String nom, String prenom) {
        List<Compte> l = ComptesDAO.getInstance().readByNomPreType(type, nom, prenom);
        GUIUtil.rempTableCompte(tableModCpt, l);
    }
    // </editor-fold>

    private void btAjoutJourGardeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btAjoutJourGardeActionPerformed
        //        GUIUtil.showMsgBox(evt.getSource().getClass().getName());
        try {
            Date d = dateGarde.getDate();
            GUIUtil.addRowCallTable(tableJourDeGarde, d);
        } catch (Exception e) {
            System.out.println("JDateChooser Exception");
        }
    }//GEN-LAST:event_btAjoutJourGardeActionPerformed

    // <editor-fold defaultstate="collapsed" desc="Table Modifier Pharmacies">
    private void txtModPhaNomCaretUpdate(javax.swing.event.CaretEvent evt) {//GEN-FIRST:event_txtModPhaNomCaretUpdate
        // TODO add your handling code here:
        Gouvernorat g = (Gouvernorat) comboBoxModPhaGouv.getSelectedItem();
        Ville v = (Ville) comboBoxModPhaVille.getSelectedItem();
        String nom = txtModPhaNom.getText();
        fillTableModPha(comboBoxModPhaType.getSelectedIndex(), g.getId_gouv(), v.getId_ville(), nom);
    }//GEN-LAST:event_txtModPhaNomCaretUpdate

    private void comboBoxModPhaGouvItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_comboBoxModPhaGouvItemStateChanged
        // TODO add your handling code here:
        Gouvernorat g = (Gouvernorat) comboBoxModPhaGouv.getSelectedItem();
        Ville v = (Ville) comboBoxModPhaVille.getSelectedItem();
        String nom = txtModPhaNom.getText();
        fillTableModPha(comboBoxModPhaType.getSelectedIndex(), g.getId_gouv(), v.getId_ville(), nom);
    }//GEN-LAST:event_comboBoxModPhaGouvItemStateChanged

    private void comboBoxModPhaVilleItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_comboBoxModPhaVilleItemStateChanged
        // TODO add your handling code here:
        Gouvernorat g = (Gouvernorat) comboBoxModPhaGouv.getSelectedItem();
        Ville v = (Ville) comboBoxModPhaVille.getSelectedItem();
        String nom = txtModPhaNom.getText();
        if (v != null) {
            fillTableModPha(comboBoxModPhaType.getSelectedIndex(), g.getId_gouv(), v.getId_ville(), nom);
        }
    }//GEN-LAST:event_comboBoxModPhaVilleItemStateChanged

    private void comboBoxModPhaTypeItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_comboBoxModPhaTypeItemStateChanged
        // TODO add your handling code here:
        Gouvernorat g = (Gouvernorat) comboBoxModPhaGouv.getSelectedItem();
        Ville v = (Ville) comboBoxModPhaVille.getSelectedItem();
        String nom = txtModPhaNom.getText();
        fillTableModPha(comboBoxModPhaType.getSelectedIndex(), g.getId_gouv(), v.getId_ville(), nom);
    }//GEN-LAST:event_comboBoxModPhaTypeItemStateChanged

    private void tabbedPaneGestionPhaMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tabbedPaneGestionPhaMouseClicked
        // TODO add your handling code here:
        GUIUtil.fillPharmacienCB(comboBoxAjoutPhaResponsable);
        fillTableModPha(0, 0, 0, "");
        fillTableDmdEvent();
    }//GEN-LAST:event_tabbedPaneGestionPhaMouseClicked

    private void txtMaPhaAjoutSrvNomActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtMaPhaAjoutSrvNomActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtMaPhaAjoutSrvNomActionPerformed

    private void btMaPhaAjoutSrvConfirmerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btMaPhaAjoutSrvConfirmerActionPerformed
        // TODO add your handling code here:
        if (GUIUtil.checkForm(panelAjoutService)) {
            TypeService typeSrv = new TypeService(-1, txtMaPhaAjoutSrvNom.getText(),
                    txtMaPhaAjoutSrvDesc.getText());
            TypesServiceDAO.getInstance().create(typeSrv);
            GUIUtil.showMsgBox(this, "Type service ajout avec succ !");
            GUIUtil.resetForm(panelAjoutService);
        }
    }//GEN-LAST:event_btMaPhaAjoutSrvConfirmerActionPerformed

    /**
     * @param t type de pharmacie
     * @param g id gouvernorat
     * @param v id ville
     * @param n nom pharmacie
     */
    private void fillTableModPha(int t, int g, int v, String n) {
        List<Pharmacie> l = PharmaciesDAO.getInstance().readByTypeVilleGouvTypeNom(t, g, v, n);
        GUIUtil.rempTablePha(tableModPha, l);
        Date d = new Date();

        StatistiquesDAO.getInstance()
                .create(new Statistiques(-1, Statistiques.STAT_RECHERCHE, 0, d.getMonth(), -1, d.getYear() + 1900));
        StatistiquesDAO.getInstance().updateByMoisAnneType(d.getMonth(), d.getYear() + 1900,
                Statistiques.STAT_RECHERCHE);
    }
    //</editor-fold>

    // <editor-fold defaultstate="collapsed" desc="Table Nouvelles Inscriptions">
    private void fillTableDmdCpt() {
        List<Compte> l = ComptesDAO.getInstance().readInactif();
        GUIUtil.rempTableNouvInscri(tableNouvInscriCpt, l);
    }
    // </editor-fold>

    // <editor-fold defaultstate="collapsed" desc="Table Demande Evenement">
    private void fillTableDmdEvent() {
        List<Evenement> l = EvenementsDAO.getInstance().readAll();
        GUIUtil.rempTableDmdEvent(tableDemandesPha, l);
    }
    // </editor-fold>

    /**
     * @param args the command line arguments
     *
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
            //            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
            //                System.out.println("Nom UIManager : " + info.getName());
            //            }
            /**
             * ********************************** Changer l'apparence de
             * l'application **************************************
             */
            // javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());
            /**
             * ********************************** Changer l'apparence de
             * l'application **************************************
             */

        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(InterfaceAdmin.class.getName()).log(java.util.logging.Level.SEVERE,
                    null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(InterfaceAdmin.class.getName()).log(java.util.logging.Level.SEVERE,
                    null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(InterfaceAdmin.class.getName()).log(java.util.logging.Level.SEVERE,
                    null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(InterfaceAdmin.class.getName()).log(java.util.logging.Level.SEVERE,
                    null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new InterfaceAdmin().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btAjoutCptAnuler;
    private javax.swing.JButton btAjoutCptConfirmer;
    private javax.swing.JButton btAjoutJourGarde;
    private javax.swing.JButton btAjoutPhaAnnuler;
    private javax.swing.JButton btAjoutPhaConfirmer;
    private javax.swing.JButton btMaPhaAjoutSrvConfirmer;
    private javax.swing.JButton buttonMaPhaAjoutSrvAnnuler;
    private javax.swing.JComboBox comboBoxAjoutCptTypeCpt;
    private javax.swing.JComboBox comboBoxAjoutPhaGouv;
    private javax.swing.JComboBox comboBoxAjoutPhaResponsable;
    private javax.swing.JComboBox comboBoxAjoutPhaType;
    private javax.swing.JComboBox comboBoxAjoutPhaVille;
    private javax.swing.JComboBox comboBoxModCptType;
    private javax.swing.JComboBox comboBoxModPhaGouv;
    private javax.swing.JComboBox comboBoxModPhaType;
    private javax.swing.JComboBox comboBoxModPhaVille;
    private com.toedter.calendar.JDateChooser dateGarde;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel44;
    private javax.swing.JLabel jLabel45;
    private javax.swing.JLabel jLabel46;
    private javax.swing.JLabel jLabel47;
    private javax.swing.JLabel jLabel48;
    private javax.swing.JLabel jLabel49;
    private javax.swing.JLabel jLabel50;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane10;
    private javax.swing.JScrollPane jScrollPane11;
    private javax.swing.JScrollPane jScrollPane12;
    private javax.swing.JScrollPane jScrollPane14;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane9;
    private javax.swing.JLabel lbAjoutCptAddresseCpt;
    private javax.swing.JLabel lbAjoutCptEmailCpt;
    private javax.swing.JLabel lbAjoutCptMDPCpt;
    private javax.swing.JLabel lbAjoutCptNomCpt;
    private javax.swing.JLabel lbAjoutCptPrenomCpt;
    private javax.swing.JLabel lbAjoutCptRMDPCpt;
    private javax.swing.JLabel lbAjoutCptTelCpt;
    private javax.swing.JLabel lbAjoutCptTypeCpt;
    private javax.swing.JPanel panelAjoutCpt;
    private javax.swing.JPanel panelAjoutPha;
    private javax.swing.JPanel panelAjoutService;
    private javax.swing.JPanel panelDemandes;
    private javax.swing.JPanel panelModCpt;
    private javax.swing.JPanel panelModPha;
    private javax.swing.JPanel panelNouvInscrit;
    private javax.swing.JPanel panelStatsInscri;
    private javax.swing.JPanel panelStatsNbrReq;
    private javax.swing.JPanel panelStatsNotePha;
    private javax.swing.JScrollPane scrollPaneAjoutPha;
    private javax.swing.JScrollPane scrollPaneDemandes;
    private javax.swing.JScrollPane scrollPaneModPha;
    private javax.swing.JScrollPane scrollPaneStatInscri;
    private javax.swing.JScrollPane scrollPaneStatsNbrReq;
    private javax.swing.JScrollPane scrollPaneStatsNotePha;
    private javax.swing.JScrollPane scrollPaneTableModCpt;
    private javax.swing.JTabbedPane tabbedPaneAdministration;
    private javax.swing.JTabbedPane tabbedPaneGestionCpt;
    private javax.swing.JTabbedPane tabbedPaneGestionPha;
    private javax.swing.JTabbedPane tabbedPaneStats;
    private javax.swing.JTable tableDemandesPha;
    private javax.swing.JTable tableJourDeGarde;
    private javax.swing.JTable tableModCpt;
    private javax.swing.JTable tableModPha;
    private javax.swing.JTable tableNouvInscriCpt;
    private javax.swing.JTextArea txtAjoutCptAddresse;
    private javax.swing.JTextField txtAjoutCptEmail;
    private javax.swing.JPasswordField txtAjoutCptMDP;
    private javax.swing.JTextField txtAjoutCptNom;
    private javax.swing.JTextField txtAjoutCptPrenom;
    private javax.swing.JPasswordField txtAjoutCptRMDP;
    private javax.swing.JTextField txtAjoutCptTel;
    private javax.swing.JTextArea txtAjoutPhaAddresse;
    private javax.swing.JTextField txtAjoutPhaEmail;
    private javax.swing.JTextField txtAjoutPhaFax;
    private javax.swing.JTextField txtAjoutPhaLatitude;
    private javax.swing.JTextField txtAjoutPhaLongitude;
    private javax.swing.JTextField txtAjoutPhaNom;
    private javax.swing.JTextField txtAjoutPhaTel;
    private javax.swing.JTextArea txtMaPhaAjoutSrvDesc;
    private javax.swing.JTextField txtMaPhaAjoutSrvNom;
    private javax.swing.JTextField txtModCptNom;
    private javax.swing.JTextField txtModCptPrenom;
    private javax.swing.JTextField txtModPhaNom;
    // End of variables declaration//GEN-END:variables
}