@Override
			public void keyPressed(KeyEvent e) {

				Object newVal = null;
				switch (e.getKeyCode()) {
					case KeyEvent.VK_UP:
						newVal = spinnerModel.getNextValue();
						break;

					case KeyEvent.VK_DOWN:
						newVal = spinnerModel.getPreviousValue();
						break;
					default:
						break;
				}
				if (newVal != null) {
					e.consume();
					spinner.setValue(newVal);
				}
			}
Creates a new IntegerSpinner using the given spinner model.

@param spinnerModel the spinner model to use in the JSpinner.
Ghidra/Framework/Docking/src/main/java/docking/widgets/spinner/IntegerSpinner.java