public double getValue() {
		String text = getText();
		String msg = null;
		double value = 0.0;
		while (true) {
			try {
				value = Double.valueOf(text.trim()).doubleValue();
				if (value >= minValue && value <= maxValue) break;
				msg = "Value is outside the specified range";
			} catch (NumberFormatException ex) {
				msg = "Illegal numeric format";
			}
			if (exceptionOnError) {
				throw new ErrorException(msg);
			} else {
				String prompt = "Enter a number";
				if (minValue != Double.NEGATIVE_INFINITY) {
					if (maxValue != Double.POSITIVE_INFINITY) {
						prompt += " between " + minValue + " and " + maxValue;
					} else {
						prompt += " greater than " + minValue;
					}
				} else {
					if (maxValue != Double.POSITIVE_INFINITY) {
						prompt += " less than " + maxValue;
					}
				}
				if (dialog == null) dialog = new IODialog(this);
				value = dialog.readDouble(prompt, minValue, maxValue);
				break;
			}
		}
		setValue(value);
		return value;
	}