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

REGRESSION: JSpinner keeps spinning in a JMenuBar

    XMLWordPrintable

    Details

      Description

      FULL PRODUCT VERSION :
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
      Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)


      ADDITIONAL OS VERSION INFORMATION :
      Linux, Kernel 2.6.8.1, Fedora Core 2

      A DESCRIPTION OF THE PROBLEM :
      When selecting the Spinner in the JMenuBar and pressing the up/down arrow
      of the spinner ONCE, the Spinner keeps spinning the values until
      either moving the mouse away from the Spinner arrow or the max/min value is reached.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Start the application given in the Source-Code Section, select the Spinner menu
      and click the up arrow once, keeping the mouse pointer onto the spinner arrow,
      but without pressing it again.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      I would expect the Spinner's value to stay when clicked once


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javax.swing.*;

      public class JSpinnerTest extends JFrame{
          public JSpinnerTest() {
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

              JMenuBar menu_bar = new JMenuBar();
              JMenu menu_spinner = new JMenu("Spinner");
              SpinnerNumberModel snm = new SpinnerNumberModel(0,0,50,1);
              JPanel p = new JPanel();
              p.add(new JLabel("Spinner Test:"));
              p.add(new JSpinner(snm));
              menu_spinner.add(p);
              menu_bar.add(menu_spinner);
              setJMenuBar(menu_bar);
              pack();
              setVisible(true);
          }

          public static void main(String[] args) {
              new JSpinnerTest();
          }
      }

      ---------- END SOURCE ----------

      Release Regression From : 1.4.2
      The above release value was the last known release where this
      bug was known to work. Since then there has been a regression.
      ###@###.### 10/15/04 04:08 GMT

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              shickeysunw Shannon Hickey (Inactive)
              Reporter:
              gmanwanisunw Girish Manwani (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: