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

Region#padding property rendering error

    XMLWordPrintable

Details

    • b18
    • x86_64
    • windows_10

    Description

      A DESCRIPTION OF THE PROBLEM :
      Two buttons that are brothers to each other, if you change the padding of one Button, it will erroneously affect the padding of the other Button.

      REGRESSION : Last worked in version 14.0.1

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Place two Buttons in the HBox, change the padding of one of the Buttons, and then observe the impact on the other Button.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      As expected, the padding of button2 should use the default value.
      ACTUAL -
      In fact, the padding of button2 becomes 0 after clicking, instead of maintaining its default value!

      ---------- BEGIN SOURCE ----------
      @Override
      public void start(Stage primaryStage) {
          
          Button button1 = new Button("111");
          Button button2 = new Button("222");
          /*
           * Only the padding of button1 is changed,
           * but it affects the padding of button2.
           */
          button1.setPadding(new Insets(4,8,4,8));
          
          HBox hBox = new HBox();
          hBox.getChildren().addAll(button1, button2);
          Scene scene = new Scene(hBox, 300, 300);
          
          primaryStage.setScene(scene);
          primaryStage.show();
      }
      ---------- END SOURCE ----------

      Attachments

        Issue Links

          Activity

            People

              jhendrikx John Hendrikx
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: