I would like to put an image at label
of the Fx library. I have tried but I can not find any method that has this function.
Label label= new Label();
label.setBackgraund();
I would like to put an image at label
of the Fx library. I have tried but I can not find any method that has this function.
Label label= new Label();
label.setBackgraund();
Right now I can not give you an example using ControlsFX.
But you can also do it without needing this library in the following way:
Image image = new Image(getClass().getResourceAsStream("tuImagen.jpg"));
Label myLabel = new Label("Texto Label");
myLabel.setGraphic(new ImageView(image));
Of course the image file must be in the folder of your project.
You can see more details in the Java documentation .