Also sharing important code snippets for your understanding so that you can modify and use this control in your project as per your requirements.
File FXMDocumentController.java :
@Override
public void initialize(URL url, ResourceBundle rb) {
ImageView imageView = new ImageView(img);
imageView.setFitHeight(800);
imageView.setFitWidth(300);
imageView.setPreserveRatio(true);
String info = “This is Cool IT Help. Here we are learning how to create InfoOverlay in FXML based project. I hope you will find this tutorial useful so please like and subscribe for more. If you have any doubts so please ask I will try my best to reply as soon as possible.”;
infooverlay = new InfoOverlay(imageView, info);
myPane.getChildren().add(infooverlay);
}
if you guys have any doubts so please leave your question and doubts in the comment box here or youtube video tutorial.
Happy Coding. 🙂