I want to create a photo gallery in javafx using pop up window . But when I pass target image to a method to set content of a pop up window to that image primary image will be removed and pop up window will be open.Why?Please help me .Thank's ( Excuse my for my bad English!!! )
This is that snippet code .
final Popup popup = new Popup();
popup.getContent().add(image);
popup.setOnShown(new EventHandler<WindowEvent>(){
@Override
public void handle(WindowEvent t) {
image.setFitHeight(400);
image.setFitWidth(400);
}
});
popup.show(stage);