InfoOverlay Implemenation in Fxml project | JavaFX

Hello Friends, In this video tutorial you will learn to implement ‘InfoOverlay’ in an FXML-based project in JavaFX. This is a very nice control provided by ControlsFX API. To implement this control in your project, you have to download ControlsFX jar. Please see the below image of InfoOverlay used in an FXML-based project in Net Beans IDE. It’s very easy to use.

I have explained the implementation with the help of a simple example in my YouTube video tutorial, so you can also watch this video tutorial for better understanding.

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. 🙂

Leave a Comment