private JSpinner createSpinner(Number value) {

		Number stepSize = Double.valueOf(.1);
		SpinnerNumberModel spinnerModel = new SpinnerNumberModel(value, null, null, stepSize);

		JSpinner spinner = new JSpinner(spinnerModel);
		NumberEditor numEditor = (NumberEditor) spinner.getEditor();
		JFormattedTextField textField = numEditor.getTextField();
		textField.setHorizontalAlignment(SwingConstants.RIGHT);

		textField.setValue(value);
		textField.setFormatterFactory(
			new BoundedRangeDecimalFormatterFactory(FLOATING_POINT_FORMAT));

		textField.setName("editor");
		textField.setColumns(12);

		textField.getDocument().addDocumentListener(new DocumentListener() {
			@Override
			public void removeUpdate(DocumentEvent e) {
				textChanged(spinner, textField);
			}

			@Override
			public void insertUpdate(DocumentEvent e) {
				textChanged(spinner, textField);
			}

			@Override
			public void changedUpdate(DocumentEvent e) {
				textChanged(spinner, textField);
			}
		});

		spinner.addMouseWheelListener(e -> {
			Number val = (Number) spinner.getValue();
			try {
				double step = spinnerModel.getStepSize().doubleValue();
				if (e.getWheelRotation() > 0) {
					spinner.setValue(decrement(val, step));
				}
				else {
					spinner.setValue(increment(val, step));
				}
			}
			catch (IllegalArgumentException iae) {
				// ignored
			}
		});

		spinnerModel.addChangeListener(e -> {
			valueChanged();
		});
		return spinner;
	}
Constructor.

@param constraint Floating-point constraint for which this component is an editor.
Ghidra/Framework/Docking/src/main/java/docking/widgets/table/constrainteditor/DoubleRangeConstraintEditor.java