public void keyPressed(KeyEvent e) {
		char c = e.getKeyChar();
		int t = Integer.parseInt(editor.getText());

		if (Character.isLetter(c)) {
			error();
			editor.setText("" + t);

		} else {
			if (e.getKeyCode() == KeyEvent.VK_UP && e.isControlDown()) {
				if (t < maxim - 4) {
					editor.setText("" + (t + 4));
				}
			}
			if (e.getKeyCode() == KeyEvent.VK_DOWN && e.isControlDown()) {
				if (t > minim + 4) {
					editor.setText("" + (t - 4));
				}
			}
			if (e.getKeyCode() == KeyEvent.VK_ENTER) {
				valid();
			}
		}
	}