Merge pull request 'sqd' (#28) from jave.Emile into main
Reviewed-on: emile.lalorcey/GSBjava#28
This commit is contained in:
		| @@ -164,10 +164,10 @@ public class jffConnexion extends javax.swing.JFrame { | ||||
|             String mdp = String.valueOf(jPFmdp.getPassword()); | ||||
|             praticienSQL testPraticien = new praticienSQL(); | ||||
|             ArrayList<String>lePraticien = testPraticien.rechercherPraticien(identifiant,mdp); | ||||
|             if (lePraticien.get(0) != null){ | ||||
|                 new jffFamilleMedoc().setVisible(true); | ||||
|             if (!lePraticien.isEmpty()){ | ||||
|                 new jffFamilleMedoc(this.profession).setVisible(true); | ||||
|             }else { | ||||
|                 //JOptionPane.showMessageDialog(null,"Erreur de connexion, Veuillez recommencer"); | ||||
|                 JOptionPane.showMessageDialog(null,"Erreur de connexion, Veuillez recommencer"); | ||||
|             }  | ||||
|          | ||||
|         }else{ | ||||
| @@ -177,7 +177,7 @@ public class jffConnexion extends javax.swing.JFrame { | ||||
|             ArrayList<String>leVisiteur = testVisiteur.rechercherVisiteur(identifiant,mdp); | ||||
|             System.out.println(leVisiteur.get(0)); | ||||
|             if (leVisiteur.get(0) != null){ | ||||
|                 new jffFamilleMedoc().setVisible(true); | ||||
|                 new jffFamilleMedoc(this.profession).setVisible(true); | ||||
|             }else { | ||||
|                 leVisiteur.add("12"); | ||||
|                 //JOptionPane.showMessageDialog(null,"Erreur de connexion, Veuillez recommencer"); | ||||
|   | ||||
| @@ -1,10 +1,60 @@ | ||||
| <?xml version="1.0" encoding="UTF-8" ?> | ||||
|  | ||||
| <Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> | ||||
|   <NonVisualComponents> | ||||
|     <Menu class="javax.swing.JMenuBar" name="jMenuBar1"> | ||||
|       <SubComponents> | ||||
|         <Menu class="javax.swing.JMenu" name="jMPage"> | ||||
|           <Properties> | ||||
|             <Property name="text" type="java.lang.String" value="Page"/> | ||||
|           </Properties> | ||||
|           <SubComponents> | ||||
|             <MenuItem class="javax.swing.JMenuItem" name="jMIProfession"> | ||||
|               <Properties> | ||||
|                 <Property name="text" type="java.lang.String" value="Choix Métier"/> | ||||
|               </Properties> | ||||
|               <Events> | ||||
|                 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMIProfessionActionPerformed"/> | ||||
|               </Events> | ||||
|             </MenuItem> | ||||
|             <MenuItem class="javax.swing.JMenuItem" name="jMIFamille"> | ||||
|               <Properties> | ||||
|                 <Property name="text" type="java.lang.String" value="Famille Medicament"/> | ||||
|               </Properties> | ||||
|               <Events> | ||||
|                 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMIFamilleActionPerformed"/> | ||||
|               </Events> | ||||
|             </MenuItem> | ||||
|           </SubComponents> | ||||
|         </Menu> | ||||
|         <Menu class="javax.swing.JMenu" name="jMInfo"> | ||||
|           <Properties> | ||||
|             <Property name="text" type="java.lang.String" value="Info"/> | ||||
|           </Properties> | ||||
|           <SubComponents> | ||||
|             <MenuItem class="javax.swing.JMenuItem" name="jMIguide"> | ||||
|               <Properties> | ||||
|                 <Property name="text" type="java.lang.String" value="Guide"/> | ||||
|               </Properties> | ||||
|               <Events> | ||||
|                 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMIguideActionPerformed"/> | ||||
|               </Events> | ||||
|             </MenuItem> | ||||
|             <MenuItem class="javax.swing.JMenuItem" name="jMcredit"> | ||||
|               <Properties> | ||||
|                 <Property name="text" type="java.lang.String" value="Crédit"/> | ||||
|               </Properties> | ||||
|             </MenuItem> | ||||
|           </SubComponents> | ||||
|         </Menu> | ||||
|       </SubComponents> | ||||
|     </Menu> | ||||
|   </NonVisualComponents> | ||||
|   <Properties> | ||||
|     <Property name="defaultCloseOperation" type="int" value="3"/> | ||||
|   </Properties> | ||||
|   <SyntheticProperties> | ||||
|     <SyntheticProperty name="menuBar" type="java.lang.String" value="jMenuBar1"/> | ||||
|     <SyntheticProperty name="formSizePolicy" type="int" value="1"/> | ||||
|     <SyntheticProperty name="generateCenter" type="boolean" value="false"/> | ||||
|   </SyntheticProperties> | ||||
| @@ -75,7 +125,7 @@ | ||||
|                   <Component id="jCBFamille" alignment="3" min="-2" max="-2" attributes="0"/> | ||||
|                   <Component id="jCBMedocListe" alignment="3" min="-2" max="-2" attributes="0"/> | ||||
|               </Group> | ||||
|               <EmptySpace pref="287" max="32767" attributes="0"/> | ||||
|               <EmptySpace pref="264" max="32767" attributes="0"/> | ||||
|           </Group> | ||||
|       </Group> | ||||
|     </DimensionLayout> | ||||
|   | ||||
| @@ -17,11 +17,12 @@ import javax.swing.JOptionPane; | ||||
|  * @author emile.lalorcey | ||||
|  */ | ||||
| public class jffFamilleMedoc extends javax.swing.JFrame { | ||||
|  | ||||
|     int metier; | ||||
|     /** | ||||
|      * Creates new form jffFamilleMedoc | ||||
|      */ | ||||
|     public jffFamilleMedoc() { | ||||
|     public jffFamilleMedoc(int metier) { | ||||
|         this.metier = metier; | ||||
|         initComponents(); | ||||
|         familleMedocSQL famille = new familleMedocSQL(); | ||||
|         jCBFamille.setModel(new DefaultComboBoxModel(famille.rechercheFamille())); | ||||
| @@ -42,6 +43,13 @@ public class jffFamilleMedoc extends javax.swing.JFrame { | ||||
|         jBRechercheValide = new javax.swing.JButton(); | ||||
|         jCBFamille = new javax.swing.JComboBox<>(); | ||||
|         jCBMedocListe = new javax.swing.JComboBox<>(); | ||||
|         jMenuBar1 = new javax.swing.JMenuBar(); | ||||
|         jMPage = new javax.swing.JMenu(); | ||||
|         jMIProfession = new javax.swing.JMenuItem(); | ||||
|         jMIFamille = new javax.swing.JMenuItem(); | ||||
|         jMInfo = new javax.swing.JMenu(); | ||||
|         jMIguide = new javax.swing.JMenuItem(); | ||||
|         jMcredit = new javax.swing.JMenuItem(); | ||||
|  | ||||
|         setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); | ||||
|  | ||||
| @@ -76,6 +84,43 @@ public class jffFamilleMedoc extends javax.swing.JFrame { | ||||
|             } | ||||
|         }); | ||||
|  | ||||
|         jMPage.setText("Page"); | ||||
|  | ||||
|         jMIProfession.setText("Choix M<>tier"); | ||||
|         jMIProfession.addActionListener(new java.awt.event.ActionListener() { | ||||
|             public void actionPerformed(java.awt.event.ActionEvent evt) { | ||||
|                 jMIProfessionActionPerformed(evt); | ||||
|             } | ||||
|         }); | ||||
|         jMPage.add(jMIProfession); | ||||
|  | ||||
|         jMIFamille.setText("Famille Medicament"); | ||||
|         jMIFamille.addActionListener(new java.awt.event.ActionListener() { | ||||
|             public void actionPerformed(java.awt.event.ActionEvent evt) { | ||||
|                 jMIFamilleActionPerformed(evt); | ||||
|             } | ||||
|         }); | ||||
|         jMPage.add(jMIFamille); | ||||
|  | ||||
|         jMenuBar1.add(jMPage); | ||||
|  | ||||
|         jMInfo.setText("Info"); | ||||
|  | ||||
|         jMIguide.setText("Guide"); | ||||
|         jMIguide.addActionListener(new java.awt.event.ActionListener() { | ||||
|             public void actionPerformed(java.awt.event.ActionEvent evt) { | ||||
|                 jMIguideActionPerformed(evt); | ||||
|             } | ||||
|         }); | ||||
|         jMInfo.add(jMIguide); | ||||
|  | ||||
|         jMcredit.setText("Cr<EFBFBD>dit"); | ||||
|         jMInfo.add(jMcredit); | ||||
|  | ||||
|         jMenuBar1.add(jMInfo); | ||||
|  | ||||
|         setJMenuBar(jMenuBar1); | ||||
|  | ||||
|         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); | ||||
|         getContentPane().setLayout(layout); | ||||
|         layout.setHorizontalGroup( | ||||
| @@ -119,7 +164,7 @@ public class jffFamilleMedoc extends javax.swing.JFrame { | ||||
|                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) | ||||
|                     .addComponent(jCBFamille, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) | ||||
|                     .addComponent(jCBMedocListe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) | ||||
|                 .addContainerGap(287, Short.MAX_VALUE)) | ||||
|                 .addContainerGap(264, Short.MAX_VALUE)) | ||||
|         ); | ||||
|  | ||||
|         pack(); | ||||
| @@ -143,7 +188,7 @@ public class jffFamilleMedoc extends javax.swing.JFrame { | ||||
|             String contreIndicationTrouve = rechercheMedoc.get(4); | ||||
|             String imgTrouve = idTrouve; | ||||
|             Medicament medocTrouve = new Medicament(idTrouve, nomTrouve , compositionTrouve, effetTrouve, contreIndicationTrouve,imgTrouve); | ||||
|             new jffInfoMedoc(medocTrouve).setVisible(true); | ||||
|             new jffInfoMedoc(medocTrouve, this.metier).setVisible(true); | ||||
|         | ||||
|              | ||||
|         }else { | ||||
| @@ -178,10 +223,24 @@ public class jffFamilleMedoc extends javax.swing.JFrame { | ||||
|             String contreIndicationTrouve = rechercheMedoc.get(4); | ||||
|             String imgTrouve = idTrouve; | ||||
|             Medicament medocTrouve = new Medicament(idTrouve, nomTrouve , compositionTrouve, effetTrouve, contreIndicationTrouve,imgTrouve); | ||||
|             new jffInfoMedoc(medocTrouve).setVisible(true); | ||||
|             new jffInfoMedoc(medocTrouve, this.metier).setVisible(true); | ||||
|         } | ||||
|     }//GEN-LAST:event_jCBMedocListeActionPerformed | ||||
|  | ||||
|     private void jMIProfessionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMIProfessionActionPerformed | ||||
|         new jffProfession().setVisible(true); | ||||
|         this.setVisible(false); | ||||
|     }//GEN-LAST:event_jMIProfessionActionPerformed | ||||
|  | ||||
|     private void jMIguideActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMIguideActionPerformed | ||||
|         // TODO add your handling code here: | ||||
|     }//GEN-LAST:event_jMIguideActionPerformed | ||||
|  | ||||
|     private void jMIFamilleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMIFamilleActionPerformed | ||||
|         new jffFamilleMedoc(this.metier).setVisible(true); | ||||
|         this.setVisible(false); | ||||
|     }//GEN-LAST:event_jMIFamilleActionPerformed | ||||
|  | ||||
|     /** | ||||
|      * @param args the command line arguments | ||||
|      */ | ||||
| @@ -212,7 +271,6 @@ public class jffFamilleMedoc extends javax.swing.JFrame { | ||||
|         /* Create and display the form */ | ||||
|         java.awt.EventQueue.invokeLater(new Runnable() { | ||||
|             public void run() { | ||||
|                 new jffFamilleMedoc().setVisible(true); | ||||
|             } | ||||
|         }); | ||||
|     } | ||||
| @@ -223,6 +281,13 @@ public class jffFamilleMedoc extends javax.swing.JFrame { | ||||
|     private javax.swing.JComboBox<String> jCBMedocListe; | ||||
|     private javax.swing.JLabel jLRecherche; | ||||
|     private javax.swing.JLabel jLabel1; | ||||
|     private javax.swing.JMenuItem jMIFamille; | ||||
|     private javax.swing.JMenuItem jMIProfession; | ||||
|     private javax.swing.JMenuItem jMIguide; | ||||
|     private javax.swing.JMenu jMInfo; | ||||
|     private javax.swing.JMenu jMPage; | ||||
|     private javax.swing.JMenuItem jMcredit; | ||||
|     private javax.swing.JMenuBar jMenuBar1; | ||||
|     private javax.swing.JTextField jTFRecherche; | ||||
|     // End of variables declaration//GEN-END:variables | ||||
| } | ||||
|   | ||||
| @@ -1,10 +1,78 @@ | ||||
| <?xml version="1.0" encoding="UTF-8" ?> | ||||
|  | ||||
| <Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> | ||||
|   <NonVisualComponents> | ||||
|     <Menu class="javax.swing.JMenuBar" name="jMenuBar1"> | ||||
|       <SubComponents> | ||||
|         <Menu class="javax.swing.JMenu" name="jMPage"> | ||||
|           <Properties> | ||||
|             <Property name="text" type="java.lang.String" value="Page"/> | ||||
|           </Properties> | ||||
|           <SubComponents> | ||||
|             <MenuItem class="javax.swing.JMenuItem" name="jMIProfession"> | ||||
|               <Properties> | ||||
|                 <Property name="text" type="java.lang.String" value="Choix Métier"/> | ||||
|               </Properties> | ||||
|               <Events> | ||||
|                 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMIProfessionActionPerformed"/> | ||||
|               </Events> | ||||
|             </MenuItem> | ||||
|             <MenuItem class="javax.swing.JMenuItem" name="jMIFamille"> | ||||
|               <Properties> | ||||
|                 <Property name="text" type="java.lang.String" value="Famille Medicament"/> | ||||
|               </Properties> | ||||
|               <Events> | ||||
|                 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMIFamilleActionPerformed"/> | ||||
|               </Events> | ||||
|             </MenuItem> | ||||
|           </SubComponents> | ||||
|         </Menu> | ||||
|         <Menu class="javax.swing.JMenu" name="jMObservation"> | ||||
|           <Properties> | ||||
|             <Property name="text" type="java.lang.String" value="Observation"/> | ||||
|           </Properties> | ||||
|           <Events> | ||||
|             <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMObservationActionPerformed"/> | ||||
|           </Events> | ||||
|           <SubComponents> | ||||
|             <MenuItem class="javax.swing.JMenuItem" name="jMIObservation"> | ||||
|               <Properties> | ||||
|                 <Property name="text" type="java.lang.String" value="jMenuItem3"/> | ||||
|               </Properties> | ||||
|               <Events> | ||||
|                 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMIObservationActionPerformed"/> | ||||
|               </Events> | ||||
|             </MenuItem> | ||||
|           </SubComponents> | ||||
|         </Menu> | ||||
|         <Menu class="javax.swing.JMenu" name="jMInfo"> | ||||
|           <Properties> | ||||
|             <Property name="text" type="java.lang.String" value="Info"/> | ||||
|           </Properties> | ||||
|           <SubComponents> | ||||
|             <MenuItem class="javax.swing.JMenuItem" name="jMIguide"> | ||||
|               <Properties> | ||||
|                 <Property name="text" type="java.lang.String" value="Guide"/> | ||||
|               </Properties> | ||||
|               <Events> | ||||
|                 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMIguideActionPerformed"/> | ||||
|               </Events> | ||||
|             </MenuItem> | ||||
|             <MenuItem class="javax.swing.JMenuItem" name="jMcredit"> | ||||
|               <Properties> | ||||
|                 <Property name="text" type="java.lang.String" value="Crédit"/> | ||||
|               </Properties> | ||||
|             </MenuItem> | ||||
|           </SubComponents> | ||||
|         </Menu> | ||||
|       </SubComponents> | ||||
|     </Menu> | ||||
|   </NonVisualComponents> | ||||
|   <Properties> | ||||
|     <Property name="defaultCloseOperation" type="int" value="3"/> | ||||
|   </Properties> | ||||
|   <SyntheticProperties> | ||||
|     <SyntheticProperty name="menuBar" type="java.lang.String" value="jMenuBar1"/> | ||||
|     <SyntheticProperty name="formSizePolicy" type="int" value="1"/> | ||||
|     <SyntheticProperty name="generateCenter" type="boolean" value="false"/> | ||||
|   </SyntheticProperties> | ||||
| @@ -104,11 +172,11 @@ | ||||
|                           <Component id="jLNomCo" min="-2" pref="37" max="-2" attributes="0"/> | ||||
|                           <EmptySpace min="-2" pref="28" max="-2" attributes="0"/> | ||||
|                           <Component id="jLComposition" min="-2" pref="74" max="-2" attributes="0"/> | ||||
|                           <EmptySpace pref="26" max="32767" attributes="0"/> | ||||
|                           <EmptySpace max="32767" attributes="0"/> | ||||
|                           <Group type="103" groupAlignment="0" attributes="0"> | ||||
|                               <Group type="102" alignment="0" attributes="0"> | ||||
|                                   <Component id="jLContrindication" min="-2" pref="141" max="-2" attributes="0"/> | ||||
|                                   <EmptySpace pref="7" max="32767" attributes="0"/> | ||||
|                                   <EmptySpace max="32767" attributes="0"/> | ||||
|                                   <Component id="jSeparator1" min="-2" pref="10" max="-2" attributes="0"/> | ||||
|                               </Group> | ||||
|                               <Component id="jLEffet" alignment="0" min="-2" pref="131" max="-2" attributes="0"/> | ||||
|   | ||||
| @@ -18,11 +18,13 @@ import javax.swing.ImageIcon; | ||||
| public class jffInfoMedoc extends javax.swing.JFrame { | ||||
|     private ArrayList<String> observation = new ArrayList<String>(); | ||||
|     observationSQL observ = new observationSQL(); | ||||
|     int metier; | ||||
|      | ||||
|     /** | ||||
|      * Creates new form jffInfoMedoc | ||||
|      */ | ||||
|     public jffInfoMedoc(Medicament medocTrouve) { | ||||
|     public jffInfoMedoc(Medicament medocTrouve, int metier) { | ||||
|         this.metier = metier; | ||||
|         initComponents(); | ||||
|         jLNomCo.setText(medocTrouve.getNom()); | ||||
|         //Icon imgMedoc = new javax.swing.ImageIcon(getClass().getResource("/img/" + medocTrouve.getImg() + ".jpg")); | ||||
| @@ -36,6 +38,9 @@ public class jffInfoMedoc extends javax.swing.JFrame { | ||||
|         if (observation.size()!= 0){ | ||||
|             jLObservation.setText(observation.get(0)); | ||||
|         } | ||||
|         if(this.metier != 0){ | ||||
|             jMObservation.setVisible(false); | ||||
|         } | ||||
|          | ||||
|     } | ||||
|  | ||||
| @@ -60,6 +65,15 @@ public class jffInfoMedoc extends javax.swing.JFrame { | ||||
|         jBsuivant = new javax.swing.JButton(); | ||||
|         jBprecedent = new javax.swing.JButton(); | ||||
|         jLObservation = new javax.swing.JLabel(); | ||||
|         jMenuBar1 = new javax.swing.JMenuBar(); | ||||
|         jMPage = new javax.swing.JMenu(); | ||||
|         jMIProfession = new javax.swing.JMenuItem(); | ||||
|         jMIFamille = new javax.swing.JMenuItem(); | ||||
|         jMObservation = new javax.swing.JMenu(); | ||||
|         jMIObservation = new javax.swing.JMenuItem(); | ||||
|         jMInfo = new javax.swing.JMenu(); | ||||
|         jMIguide = new javax.swing.JMenuItem(); | ||||
|         jMcredit = new javax.swing.JMenuItem(); | ||||
|  | ||||
|         setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); | ||||
|  | ||||
| @@ -147,11 +161,11 @@ public class jffInfoMedoc extends javax.swing.JFrame { | ||||
|                         .addComponent(jLNomCo, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE) | ||||
|                         .addGap(28, 28, 28) | ||||
|                         .addComponent(jLComposition, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE) | ||||
|                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 26, Short.MAX_VALUE) | ||||
|                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) | ||||
|                         .addGroup(jPFondLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) | ||||
|                             .addGroup(jPFondLayout.createSequentialGroup() | ||||
|                                 .addComponent(jLContrindication, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE) | ||||
|                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 7, Short.MAX_VALUE) | ||||
|                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) | ||||
|                                 .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)) | ||||
|                             .addComponent(jLEffet, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE))) | ||||
|                     .addComponent(jLImage, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE)) | ||||
| @@ -160,6 +174,60 @@ public class jffInfoMedoc extends javax.swing.JFrame { | ||||
|                 .addContainerGap()) | ||||
|         ); | ||||
|  | ||||
|         jMPage.setText("Page"); | ||||
|  | ||||
|         jMIProfession.setText("Choix M<>tier"); | ||||
|         jMIProfession.addActionListener(new java.awt.event.ActionListener() { | ||||
|             public void actionPerformed(java.awt.event.ActionEvent evt) { | ||||
|                 jMIProfessionActionPerformed(evt); | ||||
|             } | ||||
|         }); | ||||
|         jMPage.add(jMIProfession); | ||||
|  | ||||
|         jMIFamille.setText("Famille Medicament"); | ||||
|         jMIFamille.addActionListener(new java.awt.event.ActionListener() { | ||||
|             public void actionPerformed(java.awt.event.ActionEvent evt) { | ||||
|                 jMIFamilleActionPerformed(evt); | ||||
|             } | ||||
|         }); | ||||
|         jMPage.add(jMIFamille); | ||||
|  | ||||
|         jMenuBar1.add(jMPage); | ||||
|  | ||||
|         jMObservation.setText("Observation"); | ||||
|         jMObservation.addActionListener(new java.awt.event.ActionListener() { | ||||
|             public void actionPerformed(java.awt.event.ActionEvent evt) { | ||||
|                 jMObservationActionPerformed(evt); | ||||
|             } | ||||
|         }); | ||||
|  | ||||
|         jMIObservation.setText("jMenuItem3"); | ||||
|         jMIObservation.addActionListener(new java.awt.event.ActionListener() { | ||||
|             public void actionPerformed(java.awt.event.ActionEvent evt) { | ||||
|                 jMIObservationActionPerformed(evt); | ||||
|             } | ||||
|         }); | ||||
|         jMObservation.add(jMIObservation); | ||||
|  | ||||
|         jMenuBar1.add(jMObservation); | ||||
|  | ||||
|         jMInfo.setText("Info"); | ||||
|  | ||||
|         jMIguide.setText("Guide"); | ||||
|         jMIguide.addActionListener(new java.awt.event.ActionListener() { | ||||
|             public void actionPerformed(java.awt.event.ActionEvent evt) { | ||||
|                 jMIguideActionPerformed(evt); | ||||
|             } | ||||
|         }); | ||||
|         jMInfo.add(jMIguide); | ||||
|  | ||||
|         jMcredit.setText("Cr<EFBFBD>dit"); | ||||
|         jMInfo.add(jMcredit); | ||||
|  | ||||
|         jMenuBar1.add(jMInfo); | ||||
|  | ||||
|         setJMenuBar(jMenuBar1); | ||||
|  | ||||
|         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); | ||||
|         getContentPane().setLayout(layout); | ||||
|         layout.setHorizontalGroup( | ||||
| @@ -180,6 +248,29 @@ public class jffInfoMedoc extends javax.swing.JFrame { | ||||
|         pack(); | ||||
|     }// </editor-fold>//GEN-END:initComponents | ||||
|  | ||||
|     private void jMIProfessionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMIProfessionActionPerformed | ||||
|         new jffProfession().setVisible(true); | ||||
|         this.setVisible(false); | ||||
|     }//GEN-LAST:event_jMIProfessionActionPerformed | ||||
|  | ||||
|     private void jMIFamilleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMIFamilleActionPerformed | ||||
|         new jffFamilleMedoc(this.metier).setVisible(true); | ||||
|         this.setVisible(false); | ||||
|     }//GEN-LAST:event_jMIFamilleActionPerformed | ||||
|  | ||||
|     private void jMObservationActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMObservationActionPerformed | ||||
|             | ||||
|     }//GEN-LAST:event_jMObservationActionPerformed | ||||
|  | ||||
|     private void jMIguideActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMIguideActionPerformed | ||||
|         // TODO add your handling code here: | ||||
|     }//GEN-LAST:event_jMIguideActionPerformed | ||||
|  | ||||
|     private void jMIObservationActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMIObservationActionPerformed | ||||
|  | ||||
|         new jffAjoutObservation(this.observation.get(0), 1).setVisible(true); | ||||
|     }//GEN-LAST:event_jMIObservationActionPerformed | ||||
|  | ||||
|     /** | ||||
|      * @param args the command line arguments | ||||
|      */ | ||||
| @@ -224,6 +315,15 @@ public class jffInfoMedoc extends javax.swing.JFrame { | ||||
|     private javax.swing.JLabel jLNomCo; | ||||
|     private javax.swing.JLabel jLNomMedoc; | ||||
|     private javax.swing.JLabel jLObservation; | ||||
|     private javax.swing.JMenuItem jMIFamille; | ||||
|     private javax.swing.JMenuItem jMIObservation; | ||||
|     private javax.swing.JMenuItem jMIProfession; | ||||
|     private javax.swing.JMenuItem jMIguide; | ||||
|     private javax.swing.JMenu jMInfo; | ||||
|     private javax.swing.JMenu jMObservation; | ||||
|     private javax.swing.JMenu jMPage; | ||||
|     private javax.swing.JMenuItem jMcredit; | ||||
|     private javax.swing.JMenuBar jMenuBar1; | ||||
|     private javax.swing.JPanel jPFond; | ||||
|     private javax.swing.JPanel jPanel1; | ||||
|     private javax.swing.JSeparator jSeparator1; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user