Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4391296

JSpinner fails to accept keyboard input to cycle through values

XMLWordPrintable

    • beta
    • x86
    • windows_95

      As per spec the JSpinner does not accept keyboard input to traverse values

      Use sample below and try to use up\down

      Observe: No changes to value displayed

      import java.awt.*;
      import javax.swing.*;
      import javax.swing.JSpinner;
      public class JFrame2 extends JFrame {

      public JFrame2() {
      getContentPane().setLayout(null);
      setSize(405,305);
      JSpinner js = new JSpinner();
      js.setSize(300, 200);
      String[] values = {"one", "two", "free", "four"};
      js.setModel(new SpinnerListModel(values));
      getContentPane().add(js);
      }

      static public void main(String args[]) {
      (new JFrame1()).setVisible(true);
      }
      }

            svioletsunw Scott Violet (Inactive)
            jdixonsunw John Dixon (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: