implemented type attribute for SimpleTextField.java