@Override
		public void insertString(int offs, String str, AttributeSet a) throws BadLocationException {
			char[] source = str.toCharArray();
			char[] result = new char[source.length];

			int j = 0;

			String currentText = this.getText(0, this.getLength());
			currentText.toCharArray();

			for (int i = 0; i < result.length; i++) {
				if (this.type == "Hex") {
					if (Character.isDigit(source[i]) || source[i] >= 'A' && source[i] <= 'F' || source[i] >= 'a' && source[i] <= 'f') {
						result[j++] = source[i];
					} else {
						ByteTextField.this.toolkit.beep();
						System.err.println("insertString: " + source[i]);
					}
				} else if (this.type == "Decimal") {
					if (Character.isDigit(source[i])) {
						result[j++] = source[i];
					} else {
						ByteTextField.this.toolkit.beep();
						System.err.println("insertString: " + source[i]);
					}
				}
			}

			super.insertString(offs, new String(result, 0, j), a);
		}