private void jBtnSubmitModActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnSubmitModActionPerformed
      DateFormat df = new SimpleDateFormat("M/d/yy", Locale.ENGLISH);
      DateFormat tf = new SimpleDateFormat("h:mm a", Locale.ENGLISH);
      CourseSection section;
      ArrayList<MeetingDay> days = new ArrayList();

      // Create CourseSection object
      section = new CourseSection();
      section.course_number = jCmbCourseNum.getSelectedItem().toString();
      section.section_number = Integer.parseInt(jtxtSectionNumber.getText());
      section.available = true;
      section.capacity = Integer.parseInt(jFmtCapacity.getText());
      section.seats_available = section.capacity;
      section.status = "Open";
      section.term = jCmbTerm.getSelectedItem().toString();
      section.student_count = 0;
      section.type = jCmbType.getSelectedItem().toString();
      
      try
      {
        section.start_date = new Date(df.parse(dateChooserStart.getText()).getTime());
        section.last_date = new Date(df.parse(dateChooserEnd.getText()).getTime());
      }
      catch (ParseException ex)
      {
        System.out.println(ex);
      }
      
      // Build meeting day list
      int totalRows = jTblMeetingDays.getRowCount();
      MeetingDay day = new MeetingDay();
      jTblMeetingDays.clearSelection();

      for (int row = 0; row < totalRows; row++) {
        if (jTblMeetingDays.getValueAt(row, 0) != null &&
            jTblMeetingDays.getValueAt(row, 1) != null &&
            jTblMeetingDays.getValueAt(row, 2) != null &&
            jTblMeetingDays.getValueAt(row, 3) != null)
        {
          // Create MeetingDay object
          try {
            day.start_time = new Time(tf.parse(jTblMeetingDays.getValueAt(row, 0).toString()).getTime());
            day.end_time = new Time(tf.parse(jTblMeetingDays.getValueAt(row, 1).toString()).getTime());
          } catch (ParseException ex) {
            System.out.println(ex);
          }
          day.room_number = jTblMeetingDays.getValueAt(row, 2).toString();
          day.day = jTblMeetingDays.getValueAt(row, 3).toString();

          // Save MeetingDay to MeetingDay list
          days.add(day);
          
          day = new MeetingDay();
        }
      }

      GUIController.coursesections.addCourseSection(section, days);
      
      JOptionPane.showMessageDialog(null, "Course has been created");
      try {
        GUIController.courseListingCard.jTblResults.setModel(GUIController.buildTable());
      } catch (SQLException ex) {
        System.out.println(ex);
      }
      GUIController.switchTo("COURSE LISTING");
    }//GEN-LAST:event_jBtnSubmitModActionPerformed