title: How to change text color of a JButton
body: <p>I am writing a simple minesweeper game and it works now, but I am working on the pretty details like making each number a different color.</p>
  
  <p>I keep running into errors when I try to set the text color on the <code>JButton</code>. I can change the text easily enough and the background, but not the text color specifically.</p>
  
  <p>The part that keeps getting all mucked up is:</p>
  
  <pre><code>total = Integer.toString(count);
  jb.setText(total);              
  if(count == 1)
      jb.setTextColor(Color.blue);
  if(count == 2)
      jb.setTextColor(Color.green);
  if(count == 3)
      jb.setTextColor(Color.red);
  </code></pre>
  
  <p>For some reason my error is:</p>
  
  <pre><code><em>MS.java:109: error: cannot find symbol
                      jb.setTextColor(Color.blue);
                        ^
    symbol:   method setTextColor(Color)
    location: variable jb of type JButton
  MS.java:112: error: cannot find symbol
                      jb.setTextColor(Color.green);
                        ^
    symbol:   method setTextColor(Color)
    location: variable jb of type JButton
  MS.java:114: error: cannot find symbol
                      jb.setTextColor(Color.red);
                        ^
    symbol:   method setTextColor(Color)
    location: variable jb of type JButton
  3 errors
  Process javac exited with code 1</em></code></pre>
  
  <p>This occurs whenever I try to compile, but when I change it to say <code>setBackgroundColor</code> instead of <code>setTextColor</code> it works just fine.</p>