Answer the question
In order to leave comments, you need to log in
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());
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question