There's gotta be a way to do this: My JSpinner seems to like inserting commas in the numbers I enter when the number's big enough. Example: I enter "30000" and when I change the focus it makes it into "30,000". This is undesirable for the application I'm programming. The JSpinner is for entering an appartment number, and no one writes their appartment numbers with commas. Is there a way to tell it that I don't want this?
// number model with no upper limit
SpinnerNumberModel model = new SpinnerNumberModel();
JSpinner spinner = new JSpinner(model);
// new editor for displaying number without comma
JSpinner.NumberEditor editor = new JSpinner.NumberEditor(spinner, "#");
spinner.setEditor(editor);