title: Getting ENTER to work with a JSpinner the way it does with a JTextField
body: <p>First, to make my job explaining a bit easier, here's some of my code:</p>
  
  <pre><code>JSpinner spin = new JSpinner();
  JFormattedTextField text = getTextField(spin);
  
  text.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
              // Do stuff...
      }
  });
  </code></pre>
  
  <p>...</p>
  
  <pre><code>private JFormattedTextField getTextField(JSpinner spinner) {
      JComponent editor = spinner.getEditor();
  
      if (editor instanceof JSpinner.DefaultEditor) {
          return ((JSpinner.DefaultEditor )editor).getTextField();
      } else {
          System.err.println( "Unexpected editor type: "
                             + spinner.getEditor().getClass()
                             + " isn't a descendant of DefaultEditor" );
          return null;
      }
  }
  </code></pre>
  
  <p>So as you can see, I got that far.  And indeed, when I type in a value into the text field component of the spinner (<code>JFormattedTextField</code>), and THEN press ENTER, it works.</p>
  
  <p>What I want now is to be able to have the text field respond to ENTER without having to manually type in a new value (which sorta defeats the purpose of making a spinner out of it).  How do I do that?</p>