code: @Override
      protected void replaceEditor(JComponent oldEditor, JComponent newEditor) {
          spinner.remove(oldEditor);
          spinner.add(newEditor, "Editor");
          if (oldEditor instanceof JSpinner.DefaultEditor) {
              JTextField tf = ((JSpinner.DefaultEditor)oldEditor).getTextField();
              if (tf != null) {
                  tf.removeFocusListener(editorFocusHandler);
              }
          }
          if (newEditor instanceof JSpinner.DefaultEditor) {
              JTextField tf = ((JSpinner.DefaultEditor)newEditor).getTextField();
              if (tf != null) {
                  tf.addFocusListener(editorFocusHandler);
              }
          }
      }
docs: Called by the <code>PropertyChangeListener</code> when the
  <code>JSpinner</code> editor property changes.  It's the responsibility
  of this method to remove the old editor and add the new one.  By
  default this operation is just:
  <pre>
  spinner.remove(oldEditor);
  spinner.add(newEditor, "Editor");
  </pre>
  The implementation of <code>replaceEditor</code> should be coordinated
  with the <code>createEditor</code> method.
  
  @see #createEditor
  @see #createPropertyChangeListener