private byte ok() {

		String name = nameField.getText();
		if (!name.matches("\\w{4,}")) {
			return NAME_ERROR;
		}
		if (task == null) {
			if (job.containsName(name))
				return NAME_EXISTS;
			Loadable l = new AbstractLoadable(intervalField.getValue()) {
				public void execute() {
					job.runScript(getScript());
					if (job.getIndexOfStep() >= getLifetime()) {
						setCompleted(true);
					}
				}
			};
			l.setSystemTask(false);
			l.setPriority((Integer) prioritySpinner.getValue());
			l.setLifetime(permanentCheckBox.isSelected() ? Loadable.ETERNAL : lifetimeField.getValue());
			l.setName(name);
			l.setDescription(descriptionField.getText());
			l.setScript(scriptArea.getText());
			job.add(l);
			job.processPendingRequests();
		}
		else {
			task.setPriority((Integer) prioritySpinner.getValue());
			task.setInterval(intervalField.getValue());
			task.setLifetime(permanentCheckBox.isSelected() ? Loadable.ETERNAL : lifetimeField.getValue());
			task.setDescription(descriptionField.getText());
			task.setScript(scriptArea.getText());
			if (!task.getName().equals(name)) {
				task.setName(name);
				table.setValueAt(name, row, 2);
			}
		}
		return NAME_OK;

	}