Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Wrong border width

Martin ValentaMay 31 2012 — edited Jun 1 2012
Hello,
I am trying to set the border width to 1px but in some cases it is wider. For example in the following case:
public void start(Stage primaryStage) {
    Group g = new Group();
    BorderPane content = new BorderPane();
    Label l = new Label("00:00");
    content.setCenter(l);
    g.getChildren().add(content);
    content.setStyle("-fx-border-width: 1px;-fx-border-color: red;");
    
    StackPane root = new StackPane();
    root.getChildren().add(g);
    Scene scene = new Scene(root);
    primaryStage.setScene(scene);
    primaryStage.show();
  }
Is there some way how to avoid this behaviour?
This post has been answered by jsmith on Jun 1 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 29 2012
Added on May 31 2012
7 comments
145 views