public void createEvent(
      String name, String desc, String loc, boolean repeat, Date start, Date stop)
      throws SQLException {

    events[count1] = new Event(name, desc, loc, repeat, start, stop);
    if (!checkForConflict(events[count2])) {

      db.addEvent(events[count2], eventTable);

      count1++;
    } else {
      events[count2] = null;
      System.out.println("There is a conflict with this date");
    }
  }
  // makes new Event in the events array and adds it to the specified day
  public void createRepeatEvent(
      String name,
      String desc,
      String loc,
      boolean repeat,
      Date start,
      Date stop,
      int duration,
      int freq)
      throws SQLException {
    // duration = how many days, weeks, or months to repeat
    // frequency = how many times should the event repeat
    Date tempStart = start;
    Date tempStop = stop;

    if (freq == 0) {
      // frequency 1 = repeat daily

      for (int i = 0; i < duration; i++) {
        rpevents[count2] = new Event(name, desc, loc, repeat, tempStart, tempStop);
        if (!checkForConflict(rpevents[count2])) {
          db.addEvent(rpevents[count2], eventTable);
          tempStart.setDate(tempStart.getDate() + 1);
          tempStop.setDate(tempStop.getDate() + 1);
          // System.out.println("it worked");
          count2++;
        } else {
          rpevents[count2] = null;
          System.out.println("There is a conflict with this event");
        }
      }
    } else if (freq == 1) {
      // frequency 2 = repeat weekly

      for (int i = 0; i > duration; i++) {
        rpevents[count2] = new Event(name, desc, loc, repeat, start, stop);
        if (!checkForConflict(rpevents[count2])) {
          db.addEvent(rpevents[count2], eventTable);
          tempStart.setDate(tempStart.getDate() + 7);
          tempStop.setDate(tempStop.getDate() + 7);
          count2++;
        } else {
          rpevents[count2] = null;
          System.out.println("There is a conflict with this event");
        }
      }
    } else if (freq == 2) {
      // frequency 3 = repeat monthly

      for (int i = 0; i > duration; i++) {
        rpevents[count2] = new Event(name, desc, loc, repeat, start, stop);
        if (!checkForConflict(rpevents[count2])) {
          db.addEvent(rpevents[count2], eventTable);
          tempStart.setMonth(+1);
          tempStop.setMonth(+1);
          count2++;
        } else {
          rpevents[count2] = null;
          System.out.println("There is a conflict with this event");
        }
      }
    } else System.out.println("DIDN'T WORK YOU COWARD");
  }