private static JSpinner createSpinner(SpinnerModel sm) {
    JSpinner result = new JSpinner(sm);
    JComponent editor = result.getEditor();
    if (UIUtil.isUnderWin10LookAndFeel() && editor instanceof JSpinner.DefaultEditor) {
      ((JSpinner.DefaultEditor)editor).getTextField().setHorizontalAlignment(SwingConstants.RIGHT);
    }
    return result;
  }
private static JSpinner createSpinner(SpinnerModel sm)