What's wrong with the following snippet of my code?
public static void retorna(BufferedImage bufImage) throws IOException {
// String file = new String("test.png");
// setTfFoto(bufImage);
Image image = null;
SwingFXUtils.toFXImage(bufImage, (WritableImage) image);
//SwingFXUtils.toFXImage(bufImage, image);
tfFoto.setImage(image);
System.out.println("imprimiu a foto na tela");
}
tfFoto is an ImageView created using FXML but I can not in any way receive this BufferedImage from another method and make it appear in my interface.
Could someone help me?