I have document which converts input 1M to 1000000. This works fine if I set document to JTextfield. But when I set this to textfield of a JSpinner. It doesnt work because the spinner internally rejects the invalid values like "m". so if i type 1m , only 1 is sent to the document as input string. Any help would be highly appreciated.