-
Bug
-
Resolution: Unresolved
-
P4
-
8
Code to reproduce :
@Override
public void start(Stage stage) throws Exception {
BorderPane root = new BorderPane();
final CheckBox checkbox = CheckBoxBuilder.create().text("Check box the first line" +
"\nthe sec long line" + "\nthe third line")
.graphic(new Rectangle(20, 20, Color.web("lightblue")))
.focusTraversable(false).build();
Scene scene = new Scene(root, 500, 500);
checkbox.setMinSize(500, 150);
ChoiceBox choiceBox = new ChoiceBox();
choiceBox.getItems().addAll(Pos.values());
choiceBox.valueProperty().addListener(new ChangeListener() {
@Override
public void changed(ObservableValue observableValue, Object o, Object o2) {
checkbox.setStyle("-fx-border-color:green;-fx-alignment:" + o2 + ";");
}
});
root.setTop(choiceBox);
root.setCenter(checkbox);
stage.setScene(scene);
stage.show();
stage.setTitle(VersionInfo.getRuntimeVersion());
}
@Override
public void start(Stage stage) throws Exception {
BorderPane root = new BorderPane();
final CheckBox checkbox = CheckBoxBuilder.create().text("Check box the first line" +
"\nthe sec long line" + "\nthe third line")
.graphic(new Rectangle(20, 20, Color.web("lightblue")))
.focusTraversable(false).build();
Scene scene = new Scene(root, 500, 500);
checkbox.setMinSize(500, 150);
ChoiceBox choiceBox = new ChoiceBox();
choiceBox.getItems().addAll(Pos.values());
choiceBox.valueProperty().addListener(new ChangeListener() {
@Override
public void changed(ObservableValue observableValue, Object o, Object o2) {
checkbox.setStyle("-fx-border-color:green;-fx-alignment:" + o2 + ";");
}
});
root.setTop(choiceBox);
root.setCenter(checkbox);
stage.setScene(scene);
stage.show();
stage.setTitle(VersionInfo.getRuntimeVersion());
}
- relates to
-
JDK-8115888 CheckBox render incorrectly with multi lines string and alignment
-
- Closed
-