I have a class already provided that creates a layout of buttons but only with text inside of them. I was wondering if there is anyway to add the corresponding icon to the button:
public ShapeButtons(View view){
String[] buttonLabels = { "Circle", "Rectangle", "Square", "Squiggle", "Polyline" };
for (String label : buttonLabels) {
Button button = new Button(label);
button.setMinWidth(100);
this.add(button, 0, row);
row++;
button.setOnAction(this);
}
For the constructor of button, I know there is a way to do Button(Text, Node graphic) but I can't seem to figure out how to do it?