title: White screen appearing in java when i use g.drawString
body: <p>So I'm supposed to make a game that has a score in its HUD but whenever i use the code</p>
  
  <pre><code>g.drawString("Score: " + score, 15, 64);
  //score is a variable
  </code></pre>
  
  <p>it appears a white screen like this</p>
  
  <p><a href="https://i.stack.imgur.com/UJRKy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UJRKy.png" alt="enter image description here"></a></p>
  
  <p>the full code of the HUD is like this</p>
  
  <pre><code>import java.awt.Color;
  import java.awt.Graphics;
  
  public class HUD {
  
  public static int HEALTH = 800;
  
  private static int gvalue = 255;
  
  public int score = 0;
  public int level = 1;
  
     public void tick(){
           HEALTH = MainGame.clamp(HEALTH, 0, 800);
  
           gvalue = MainGame.clamp(gvalue, 0, 255);
           gvalue = HEALTH/4;
  
           score++;
     }
  
  public void render(Graphics g){
         g.setColor(Color.gray);
         g.fillRect(15, 15, 200, 30);
         g.setColor(new Color(70, gvalue, 0));
         g.fillRect(15, 15, (HEALTH / 4) , 30);
         g.setColor(Color.white);
         g.drawRect(15, 15, 100 * 2, 30);
  
         g.drawString("Score: " + score, 15, 64);
         //the line above though, when i remove it, it completely works
     }
  
    public int getScore() {
          return score;
      }
  
      public void setScore(int score) {
          this.score = score;
      }
  
      public int getLevel() {
          return level;
      }
  
      public void setLevel(int level) {
          this.level = level;
      }
      } 
  </code></pre>
  
  <p>P.S I have objects, windows, colors, etc. but they are in other classes. 
  P.P.S When I remove, the said line, it works fine.</p>