title: how to set color of Jbutton
body: <p>How can I set the color of a JButton ?</p>
  
  <p>I have tried this:</p>
  
  <pre><code>button.setBackground(Color.red);
  </code></pre>
  
  <p>but with no success. This just changes the color of button's border.
  I then tried to override <code>paintComponents</code></p>
  
  <pre><code>public void paintComponent(Graphics g) {
     g.setColor(Color.GREEN);
     g.fillRect(0, 0, getSize().width, getSize().height);
  }
  </code></pre>
  
  <p>but now I don't see the text on the JButton</p>