if(getComponentOrientation().isLeftToRight()) ftf.setHorizontalAlignment(JTextField.RIGHT); else ftf.setHorizontalAlignment(JTextField.LEFT);
    public DefaultEditor(JSpinner spinner)    {      super();      setLayout(this);      this.spinner = spinner;      ftf = new JFormattedTextField();      add(ftf);      ftf.setValue(spinner.getValue());      ftf.addPropertyChangeListener(this);      spinner.addChangeListener(this);    }