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

RFE:decimal values for JSlider

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 1.4.2
    • client-libs
    • Fix Understood
    • x86
    • windows_nt

      FULL PRODUCT VERSION :

      ADDITIONAL OS VERSION INFORMATION :

      A DESCRIPTION OF THE PROBLEM :
      Need to create slider bars with decimal values. (0.5-2) for example. The integers limit the slider capabilities especially for scientific applications.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Allow JSlider values to be decimals (double or float, for example)
      ACTUAL -
      Only integer values are allowed

      ---------- BEGIN SOURCE ----------
        From the JSlider API:
      setValue
      public void setValue(int n)Sets the sliders current value. This method just forwards the value to the model.

      See Also:
      getValue()

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

      CUSTOMER SUBMITTED WORKAROUND :
      Use the integer values from 0 to 100 and scale the actual values by the 0 to 100 scale.
      ###@###.### 2004-08-26

            Unassigned Unassigned
            jssunw Jitender S (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: