Issue
I'm using FontAwesome Glyphs in a button and want to change the color in a method. Does anyone know how to do this? I also tried "-fx-fill: black;". Both don't work.
import de.jensd.fx.glyphs.fontawesome.FontAwesomeIcon;
public FontAwesomeIcon close;
close.setStyle("-fx-fill: black;");
Solution
try this
import de.jensd.fx.glyphs.fontawesome.FontAwesomeIconView;
FontAwesomeIconView fa = new FontAwesomeIconView(FontAwesomeIcon.CLOSE);
fa.setStyle("-fx-font-family: FontAwesome; -fx-fill: BLACK; -fx-font-size: 28px");
Answered By - Cesar Salas
Answer Checked By - Clifford M. (JavaFixing Volunteer)