Originally posted by Aravind Prasad: This is also good option, But I want the users only to enter a value which is having 4 digits and it should be greater than 1000. Meaning the number ranges from 1000 to 9999 only.
Please help me to sort out the problem in JFormattedTextField.
Well ok, change nf.setMaximum(10000) to nf.setMaximum(9999) then. And leave out field.setValue() if you wish.