java change color of button when clicked code example Example: change button color java swing botton.SetBackground(Color.red);