I have a BorderPane
on a Scene
.& I have a background image in that pane.
My code for that image:
BorderPane B_pane = new BorderPane();
Image image = new Image("/Client/social3.png",width,height,false,true,true);
ImageView imageView = new ImageView(image);
B_pane.getChildren().add(imageView);
Later I have added some VBox
as Left , Right portion in that pane.I want to change the background image of that BorderPane
(Obviously without causing any change in the VBox's position,element) with particular Button
click.How can I do it?
Just really use a background image instead of adding a
ImageView
as child: