I have jbutton in the main class, so I put it as public to be able to access from another class. but you are 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 is public javax.swing.JButton jButton1;
I do not know what to do because it is already public