if (userEvents.length != startLength) writeEventsToFile(); endDialog();
if (userEvents.length != startLength) { Base.writeEventsToFile(userEvents); } endDialog();
				public void windowClosing(WindowEvent event)				{				    if (userEvents.length != startLength)					    writeEventsToFile();				    endDialog();				}