Accept measuring units in JSpinner as input
问题 I have a numeric JSpinner which accepts values in a specific measuring unit. Now, I'd like to have a special JSpinner behavior: If a user enters a numeric value and appends a specific measuring unit string (e.g. "inch", "pica") then the entered numeric value must be converted into another value (depending on the unit string). This conversion must occur when user leaves the spinner field (focus lost) or if a "commitEdit" occurs in any way. I've tried several variants: Custom document filter,