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

Checkbox and RadioButton: style -fx-alignment doesn't work with invocation setPrefSize

    Details

      Description

      This also applies to RadioButton.

      Run this code to reproduce
      @Override
          public void start(Stage stage) throws Exception {
              StackPane root = new StackPane();
              
              final CheckBox che = new CheckBox("MinSize");
              final CheckBox che2 = new CheckBox("PrefSize");
              String style = "-fx-border-color:red;-fx-alignment:bottom-right;";
              che.setStyle(style);
              che2.setStyle(style);
              che.setMinSize(150, 150);
              che2.setPrefSize(150, 150);
              root.getChildren().add(HBoxBuilder.create().children(che, che2).spacing(20).alignment(Pos.CENTER).build());
              
              Scene scene = new Scene(root, 320, 300);
              stage.setScene(scene);
              stage.show();
              stage.setTitle(VersionInfo.getRuntimeVersion());
          }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                raginip Ragini Prasad (Inactive)
                Reporter:
                slugovoy Sergey Lugovoy (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved:
                  Imported: