I created a little method that should change the color of the image, but can't make it happen.
In the Label component I load the image like this:
Label lbImagenInventario = new Label ();
FontImage.setMaterialIcon (lbImagenInventario, FontImage.MATERIAL_LOCAL_SHIPPING);
And the method is as follows:
private void changesInventColor (Double quantity, Label lbIcon, Label lbCantidad) {
if (quantity <0) {
lbIcono.setIconUIID ("LabelRojo");
lbCantidad.setText (round (amount, 2));
lbCantidad.setUIID ("LabelRojo");
} else if (amount> 0) {
lbIcono.setIconUIID ("LabelVerde");
lbCantidad.setText (round (amount, 2));
lbCantidad.setUIID ("LabelVerde");
} else {
lbIcono.setIconUIID ("LabelGris");
lbCantidad.setText (round (amount, 2));
lbCantidad.setUIID ("LabelGris");
}
}