public void save()
	{
		
		User assignedTo = null;
		
		for (User u : users.getUsers())
		{
			if (u.getUserName().equals(cboxAssignedTo.getText()))
			{
				assignedTo = u;
			}
		}
		try
		{
			theTask.setTitle(txtTitle.getText());
			theTask.setComments(txtComments.getText());
			theTask.setDescription(txtDescription.getText());
			theTask.setDueDate(FormatDate.convertDateTimeToCalendar(dueDate));
			theTask.setUpdatedDate(Calendar.getInstance());
			theTask.setPriority(PriorityCode.valueOf(cboxPriority.getText()));
			theTask.setStatus(StatusCode.valueOf(cboxStatus.getText()));
			theTask.setAssignedTo(assignedTo);
			try
			{
				double number;
				number = Double.parseDouble(txtTimeEstimate.getText());
				theTask.setTimeEstimate(number);
				number = Double.parseDouble(txtTimeSpent.getText());
				theTask.setTimeSpent(number);
			}
			catch (NumberFormatException nfe)
			{
				MyMessageBox error = new MyMessageBox(shell, "Error", "Please enter a non-negative numeric value for Time Estimate and Time Spent.", "OK");
				error.open();
			}
			
			tasks.getTasks();
			tasks.editTask(theTask);
			MyMessageBox success = new MyMessageBox(shell, "Save succeeded", "Task has been updated.", "OK");
			success.open();
			shell.close();
		}
		catch(IllegalArgumentException iae)
		{
			MyMessageBox error;
			if (iae.getMessage() == null)
			{
				error = new MyMessageBox(shell, "Illegal Field", "Check your inputs", "OK");
			}
			else
			{
				error = new MyMessageBox(shell, "Illegal Field", iae.getMessage(), "OK");
			}
			error.open();
		}
	}