package com.main;
import javax.swing.JTextField;
import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
import javax.swing.text.Document;
import javax.swing.text.PlainDocument;

public class DigitTextField extends JTextField{

	
	public DigitTextField(int cols) {
		super(cols);
	}
	
	public DigitTextField() {
			super();
		}
	
	protected Document createDefaultModel() {
		return new DigitDocument();
	}
	
	static class DigitDocument extends PlainDocument {
		
		public void insertString(int offs, String str, AttributeSet a) 
		throws BadLocationException {
			
			if (str == null) {
				return;
			}
			char[] upper = str.toCharArray();
			boolean isDigit=true;
			
			for (int i = 0; i < upper.length; i++) {
				upper[i] = Character.toUpperCase(upper[i]);
				if(!Character.isDigit(upper[i]) && upper[i]!='.' && upper[i]!='-')
					{
					isDigit=false;
					break;
				}
			
			}
			if(isDigit)
				super.insertString(offs, new String(upper), a);
		}
	}

}

@@ -207,16 +207,125 @@
 ent;%0D%0A%0D%0A
+/**%0D%0A * Responsible for creating text fields to read numbers%0D%0A * @author Group 12%0D%0A * @version 2.1%0D%0A *%0D%0A */%0D%0A
 public c

Update DigitTextField.java