public void actionPerformed(ActionEvent e)
	    { 	    	
		    // get the strings to be added to the database...
		    String dateStr = dateField.getText();
		    String startTimeStr = startTimeField.getText();
		    String endTimeStr = endTimeField.getText();
		    	   
		    // Date to indicate the start day (00:00 on that day)
		    Date date = null;
		    
		    // Start and end times for the event: represented as times on Jun 1 1970
		    // to facilitate arithmetic. 
		    Date startTime = null;
		    Date endTime = null;

		    // Time zone to be assigned to Date date.
		    TimeZone timeZone = TimeZone.getDefault();

		    // set time zones. since sdf1 is already offset by virtue of being adjusted 
		    // to the local time, sdf 2, which holds only hours from Unix Epoch 0, should
		    // not be changed.
			sdf1.setTimeZone(timeZone);
			sdf2.setTimeZone( TimeZone.getTimeZone("UTC") );
			
		    // Using validation functions, initialize the three Date objects from 
			// the strings entered in the fields.
			date = Validation.validDate(dateStr, sdf1);
			startTime = Validation.validDate(startTimeStr, sdf2);
			endTime = Validation.validDate(endTimeStr, sdf2);
			
		    if(date == null || startTime == null || endTime == null)
		    {	
		    	// Tell the user they entered an invalid time. Which they did. 
		    	startTimeField.setText(UI_TIME_ERROR);		    	
		    }
		    else
		    {	
		    	// Calculate the startSecond and duration of the block, and write them to the db.
		    	long startSecond = ( startTime.getTime() / 1000l ) + ( date.getTime() / 1000l ) ; 		    	
		    	int duration = (int) ( endTime.getTime() - startTime.getTime() ) / 1000;	    			    			    	

		    	// Add a new row to the database.
		    	addDBRow( startSecond, duration, typeField.getText(), commentArea.getText() );
		    	
		    	// Also add this data to the table model in the same session
				// without reading the DB.
				String[] rowData = new String[4];
				rowData[0] = typeField.getText();
				rowData[1] = TIME_DISPLAY_FORMAT.format( startSecond * 1000 );
				rowData[2] = TIME_DISPLAY_FORMAT.format( ( startSecond + duration ) * 1000 );
				rowData[3] = commentArea.getText();
				
				// With a single line of code, we add a row to the table!
				session.getViewPannel().getTableModel().addRow(rowData);	    	
		    }
	    }