Exemple #1
0
 /** Creates new form JFAddDev */
 public JFAddDev() {
   initComponents();
   this.jLerr.setVisible(false);
   this.jLerr.setForeground(Color.red);
   DefaultComboBoxModel listSite = new DefaultComboBoxModel();
   listSite = DBMana.selectDBSite(listSite);
   selectSite.setModel(listSite);
   String siteName = (String) this.selectSite.getSelectedItem();
   DefaultComboBoxModel listRoom = new DefaultComboBoxModel();
   listRoom = DBMana.selectDBRoom(listRoom, siteName);
   selectRoom.setModel(listRoom);
   String os = (String) this.selectTypeDev.getSelectedItem();
   if ("Ordinateur".equals(os)) {
     DefaultComboBoxModel listOs = new DefaultComboBoxModel();
     listOs.addElement("OS x");
     listOs.addElement("Linux");
     listOs.addElement("Windows");
     selectOs.setModel(listOs);
   } else if ("Tablette".equals(os)) {
     DefaultComboBoxModel listOs = new DefaultComboBoxModel();
     listOs.addElement("iOS");
     listOs.addElement("Androïd");
     listOs.addElement("Windows");
     selectOs.setModel(listOs);
   }
 }
 /** Creates new form JFAddSite */
 public JFAddRoom() {
   initComponents();
   this.setResizable(false);
   this.jLerr.setVisible(false);
   this.jLerr.setForeground(Color.red);
   DefaultComboBoxModel listSite = new DefaultComboBoxModel();
   listSite = DBMana.selectDBSite(listSite);
   selectSite.setModel(listSite);
 }