@Override
	public void actionPerformed(ActionEvent e) {
		
		
		if (e.getActionCommand().equals("Ok"))
		{
			SimpleDateFormat format = new SimpleDateFormat("h:mm a");
			Date time = (Date)spinner.getValue();
			Date time2 = (Date)spinner2.getValue();
			String startTime = format.format(time);
			String endTime = format.format(time2);			
			Event evt = new Event(eventName.getText(), startTime, endTime, place.getText(), descrip.getText());
			CalendarDrawArea.addEventInTime(evt);			
		}
		
		 EditWindow.super.dispose();//closes the window

		
	}