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

invalid slider ticks

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8, 9
    • javafx

      Please run the following code


      import javafx.application.Application;
      import javafx.geometry.Insets;
      import javafx.scene.Group;
      import javafx.scene.Scene;
      import javafx.scene.control.Slider;
      import javafx.stage.Stage;

      public class SliderTest extends Application {

          @Override
          public void start(Stage stage) {

              Group root = new Group();
              Scene scene = new Scene(root, 150, 100);
              stage.setScene(scene);

              double x = 1.e-4;
              Slider s = new Slider(0., x, x / 3);
              s.setPadding(new Insets(20, 20, 20, 20));
              s.setShowTickLabels(true);
              s.setShowTickMarks(true);
              s.setMajorTickUnit(x / 3);

              root.getChildren().add(s);
              stage.show();
          }

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

      all the slider tick labels are "0" - see "nok1.png"

      then try x = 1.e-3 => "nok2.png"

      JDK9 b132 was used. OS - Windows 7

        1. Slider_incorrect_tick_marks.png
          Slider_incorrect_tick_marks.png
          2 kB
        2. nok3.png
          nok3.png
          3 kB
        3. nok2.png
          nok2.png
          2 kB
        4. nok1.png
          nok1.png
          2 kB

            Unassigned Unassigned
            avstepan Alexander Stepanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: