code: private static void enableSpinnerDragging(JSpinner spinner)
      {
          SpinnerDraggingHandler spinnerDraggingHandler = 
              new SpinnerDraggingHandler(spinner);
          int n = spinner.getComponentCount();
          for (int i=0; i<n; i++)
          {
              Component c = spinner.getComponent(i);
              String name = c.getName();
              if ("Spinner.nextButton".equals(name) ||
                  "Spinner.previousButton".equals(name))
              {
                  c.addMouseListener(spinnerDraggingHandler);
                  c.addMouseMotionListener(spinnerDraggingHandler);
              }
          }
      }
docs: Enable dragging for the given spinner, by adding a
  {@link SpinnerDraggingHandler} to the spinner buttons
  
  @param spinner The spinner