-4
I got the jbutton in the main class, so I put him in the public room so I could access from another class. but you’re not doing the right thing
public class piscarbt{
tela t = new tela();
public void piscar(){
t.jButton1.setBackground(Color.white);
}
}
I made this code and the color of jbutton does not change, remembering that in the main class it ispublic javax.swing.JButton jButton1;
I don’t know what to do
It’s not very easy to do, but it’s not impossible to learn. See http://stackoverflow.com/questions/7115672/change-jbutton-gradient-color-but-only-for-one-button-not-all?lq=1
– user28595