void deleteActivity(Component dialogParent, Activity activity) {
		if (activity != null) {
			if (AlertMessages.deleteActivityConfirmation(dialogParent, activity)) {
				try {
					Connection conn = Dao.getConnection();
					for (Time t : timeDao.getTimesByActivity(conn, activity)) {
						timeDao.deleteTime(conn, t);
					}
					activityDao.deleteActivity(conn, activity);
					activityDialog.setActivity(null);
					activityListDialog.selectPreviousRow();
					activityDialog.setVisible(false);
				} catch (SQLException ex) {
					ErrorMessages.sqlExceptionError("deleteActivity()", ex);
				} catch (ClassNotFoundException ex) {
					ErrorMessages.classNotFoundError("deleteActivity()", ex);
				}
			}
		} else {
			AlertMessages.noActivitySelectedInTableForDeleting(activityListDialog);
		}
	}