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

JSpinner:Keyboard navigation not working at lower & upper limits.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.4.0
    • 1.4.0
    • client-libs
    • beta
    • sparc
    • solaris_7
    • Verified

      I am using a JSpinner with SpinnerNumberModel. The up/down arrows work okay to navigate within the range say 0 to 100, but not at 0 or 100. The user is pretty much stuck and the workaround is to use mouse or change the value to anything other than 0 or 100.

      % java -version
      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b50)
      Java HotSpot(TM) Client VM (build 1.4beta-B50, mixed mode)

      Code used:
      ---------
      import javax.swing.*;

      public class testSpin extends JFrame {
        JSpinner spin;
        SpinnerNumberModel model;
        
        Integer value = new Integer(50);
        Integer min = new Integer(0);
        Integer max = new Integer(100);
        Integer step = new Integer(1);

        public testSpin() {
          setSize(100, 100);
          
          model = new SpinnerNumberModel(value, min, max, step);
          spin = new JSpinner(model);
          getContentPane().add(spin);
        }

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

            svioletsunw Scott Violet (Inactive)
            sramansunw Sridhar Raman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: