protected void calcSpValue() {
		double t = 0.0;
		double result = 0.0;
		int i, j, k;
		double[] x = new double[Def.N];
		double[] y = new double[Def.N];

		try {
			t = Double.parseDouble(spTTextField.getText());
		} catch (NumberFormatException e) {
			JOptionPane.showMessageDialog(null, ErrMessage.T_WRONG);
			spTTextField.requestFocus();
			spTTextField.selectAll();
		}

		String xstr = spXTextField.getText();
		String ystr = spYTextField.getText();
		Scanner xs = new Scanner(xstr);
		Scanner ys = new Scanner(ystr);

		k = 0;
		while (ys.hasNextDouble()) {
			y[k] = ys.nextDouble();
			k++;
		}
		j = k;

		k = 0;
		while (xs.hasNextDouble()) {
			x[k] = xs.nextDouble();
			k++;
		}
		i = k;

		// 若x个数不为2，则可知输入数据一定为不等距的
		if (i != 2) {
			if (i != j) {
				// x与y的个数不匹配
				JOptionPane.showMessageDialog(null, ErrMessage.NOT_MATCH);
				spXTextField.requestFocus();
				spXTextField.selectAll();
			} else {
				// x与y的个数匹配，检查x是否为升序输入
				for (k = 0; k < i - 2; k++) {
					if (x[k] > x[k + 1]) {
						JOptionPane.showMessageDialog(null, "请按升序输入x值。");
						spXTextField.requestFocus();
						spXTextField.selectAll();
					}
				}
				result = clacSp(j, x, y, t);
			}
		} else {
			if (j < 2) {
				// x与y的个数不匹配
				JOptionPane.showMessageDialog(null, "输入格式错误，请检查重输。");
				spXTextField.requestFocus();
				spXTextField.selectAll();
			} else {
				result = clacSp(j, x[0], x[1] - x[0], y, t);
			}
		}

		spResultTextField.setText(result + "");
	}