public static Vector<Integer> getValuesInVector(String query) throws SQLException {
    Vector<Integer> vc = new Vector<Integer>();

    ResultSet rs = Utilfunctions.executeQuery(query);
    while (rs.next()) vc.add(rs.getInt(1));

    return vc;
  }
 public static int getClassCode(String classString) throws SQLException {
   ResultSet rs =
       Utilfunctions.executeQuery(
           "SELECT classCode FROM class WHERE CONCAT(course,' ',dept,' ',year,' - ',section) = '"
               + classString
               + "'");
   rs.next();
   return rs.getInt(1);
 }
 public static void populateComboBoxwithQuery(JComboBox ComboBox, String Query)
     throws SQLException {
   ComboBox.removeAllItems();
   ResultSet result = Utilfunctions.executeQuery(Query);
   try {
     while (result.next() != false) {
       ComboBox.addItem(result.getString(1));
     }
   } catch (Exception e) {
     // Logger.getLogger(DayWisePeriodConfigChooseForm.class.getName()).log(Level.SEVERE, null, e);
     JOptionPane.showMessageDialog(null, e);
   }
 }