solve the problem of AddEvent.java