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

Slider with specified prefHeight is bigger than it should be

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • fx2.0
    • fx2.0
    • javafx
    • presidio-graphics-scrum #2254

      See attached screenshot. Slider should have the same height as the rectangle.

      Code snippet:

      Group root = new Group();
      Scene scene = new Scene(root, 500, 500);
              
      Rectangle rectangle = new Rectangle(100, 100);
      rectangle.setLayoutX(50);
      rectangle.setLayoutY(50);
              
      Slider slider = new Slider();
      slider.setOrientation(Orientation.VERTICAL);
      slider.setPrefHeight(100);
      slider.setPrefWidth(15);
      slider.setLayoutX(200);
      slider.setLayoutY(50);
              
      root.getChildren().addAll(rectangle, slider);
      stage.setScene(scene);
      stage.setVisible(true);

            psomashe Parvathi Somashekar (Inactive)
            mhorejsi Miroslav Horejsi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: