@Override
      public void actionPerformed(ActionEvent e) {
        int newValue = getIntValue(spinner) + inc;
        SpinnerNumberModel model = (SpinnerNumberModel)spinner.getModel();
        if (newValue <= (Integer)model.getMaximum() && newValue >= (Integer)model.getMinimum()) {
          boolean hasSelection = field.getSelectionStart() != field.getSelectionEnd();
          model.setValue(newValue);
          if (hasSelection) field.selectAll();
        }
      }
@Override
      public void actionPerformed(ActionEvent e)