title: Java Change Button Background Color
body: <p>I am using netbeans to create a desktop application, and I am trying to change the background color of a JButton, btn1 using the code</p>
  
  <blockquote>
    <p>btn1.setBackground(Color.Red)</p>
  </blockquote>
  
  <p>But this does not work. Instead of changing the fill color of the button, only the border color is changed. How can I change the background fill?</p>
  
  <p>Thanks</p>