title: Score sytem for my java game
body: <p>I'm making a basic 2D side scroller for a college assignment. I'm looking to add a scoring system to it, to ultimately have a high score system. I'm having trouble getting the score to display, I have a block, that when the player touches it, they get + 1 score, I used:</p>
  
  <pre><code>JOptionPane.showMessageDialog(null, "Your score : " + Score);
  </code></pre>
  
  <p>This confirmed that the score was increasing properly. I would like to display the score in the top right of the window constantly, how would I go about it?</p>
  
  <p>Other parts of the score code:</p>
  
  <pre><code>int Score = 0;
  
  public String ScoreCount = "Score: " + Score;
  </code></pre>
  
  <p><strong>Edit:</strong>
  Thanks for the support, I'm still having trouble with getting it to display. I have:
  <br />
      int Score = 0;
      public String ScoreCount = "Score: " + Score;</p>
  
  <pre><code>JLabel scoreLabel = new JLabel("Score: 0");
  public void someoneScored()
  {
  scoreLabel.setBounds(10, 10, 100, 50);
  scoreLabel.setText("Score: " + Score);
  }
  </code></pre>
  
  <p><br />
  My game has a black background (just a rectangle) would I need to change the colour of the JLabel? (I tried to change the colour of the background to white, and I still couldn't see it).</p>