P
P
postya2019-03-24 16:21:54
Java
postya, 2019-03-24 16:21:54

How to position text around an image in JavaFX?

I am writing a desktop application in JavaFX and Scene Builder.
There is an AnchorPane to which the label is located, this label has text and an image.
The text is located after the image, but when it becomes larger, it does not go under the image, the image moves with it.
Here is what I have:

@FXML  private AnchorPane previewCard;
@FXML  private Label lb_randomCard;
@FXML  private ImageView previewImage;

@FXML
  public void initialize(URL location, ResourceBundle resources) {

lb_previewCard.wrapTextProperty().bind(previewCard.prefWidthProperty());

}

5c9784106d350473485826.jpeg5c978417d3ab0624435554.jpeg5c97841f14b09370071136.jpegHow to position text around an image like this?
5c97846215794588401085.jpeg

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question