private void submit_buttonActionPerformed(ActionEvent evt) {// GEN-FIRST:event_submit_buttonActionPerformed
		Boolean ok_to_submit = fieldCheck();
                if (ok_to_submit){
                Instructor instructor_taken;
		String instField = instruct_combo.getSelectedItem().toString();
		instField = instField.substring(instField.indexOf("-") + 2);
		int instID = Integer.parseInt(instField);
		instructor_taken = (Instructor) AccountAccess
				.constructAccountObject(AccountAccess.accessUsername(instID));
		Course new_course = new Course(course_name_field.getText(),
				course_id_field.getText(), instructor_taken,
				course_start_formatfield.getText(),
				course_end_formatfield.getText());

		// Add the course to course db
		CourseAccess.createCourse(new_course);

		// Add the TA to the TA table
		if (ta_list.getText() != null) {
			String[] tasplit = ta_list.getText().split(",");
			for (int i = 0; i < tasplit.length - 1; i++) {
				String[] ta = tasplit[i].split(" - ");
				CourseAccess.addTA(course_id_field.getText(),
						Integer.parseInt(ta[1].trim()), ta[0].trim());
			}
		}
 
		if (accounts_list != null) {
			// Add the CSV file
			CourseAccess.clearStudentList(course_id_field.getText());
			String student_name;
			String student_id;

			for (String i : accounts_list) {
				String[] arr = i.split(", ");
				student_name = arr[0];
				student_id = arr[1];

				// Push the student to the database
				CourseAccess
						.addStudent(student_name, Integer.parseInt(student_id),
								course_id_field.getText());
			}
		}

		JOptionPane.showMessageDialog(this,
				"Course " + new_course.getCourseName() + " added.");
		setOkToNav();
                GUIUtils.getMasterFrame(this).goBack();
                }
	}// GEN-LAST:event_submit_buttonActionPerformed