Everything here works perfectly except for the fact that buttons 1,2 and 3 do not change color when needed, I think this has something to do with(try-catch)? IDK I'm pretty new at coding so I can't tell, plz help!
if(b1 ==("X") && b2 == ("X") && b3 ==("X"))
{
JOptionPane.showMessageDialog(this, "Player X Wins!!");
xCount++;
gameScore();
txtbtn1.setBackground(Color.YELLOW);
txtbtn2.setBackground(Color.yellow);
txtbtn3.setBackground(Color.yellow);
try{
Thread.sleep(1000);
} catch(InterruptedException ex){
Thread.currentThread().interrupt();
}
ResetGame();
}