1

I am try to change the image of this component from another project. I have no compilation´s errors but it leaves it without image. Failed properties:

 public Image getCompImageView() {
    return compImageViewProperty().get();
}

public void setCompImageView(Image imagen) {
    compImageViewProperty().set(imagen);
}

// Indica como tratar este componente.
public ObjectProperty<Image> compImageViewProperty() {
    return compImageView.imageProperty();
}

Controller(where do i try it):

@FXML  // Button
public void mostrarDatosUsuario() {

    componente.setTextoNombreUsuario("FRS.C");

    Image imagen = new Image(getClass().getResourceAsStream("usuario.png"));
    marco.setImage(imagen);
    componente.setCompImageView(imagen);
}
  • 1
    [mcve] please (and be certain the resource lookup is correct, see https://stackoverflow.com/questions/61531317/how-do-i-determine-the-correct-path-for-fxml-files-css-files-images-and-other) – kleopatra Feb 15 '21 at 16:32

0 Answers0