I made a Jbutton:
private JButton button1 = new JButton();
then my icon
ImageIcon icon = new ImageIcon("imagepath");
button1.setIcon(icon)
and later in the program I disable the button ( its a tic tac toe game ), but the icon also turns gray ( it is supossed to stay a red square ), and idk how to fix that.
( my first time posting, idk if i did ok, please post tips )