I am a newbie in JavaFX and I try by clicking on one imageview (ImageView1)get its image and set another imageview (ImageView2) with that image.
BufferedImage actualBufferedImage= SwingFXUtils.fromFXImage(ImageView1.getImage(), null);
WritableImage actualImage= SwingFXUtils.toFXImage(image, null);
ImageView2.setImage(actualImage);
But I got NullPointerException. This exception happens in setImage line. I can not find out why actualImage is null after toFXIamge.