title: Display Score in a java game
body: <p>I am making a maze game in java. I have add player, time limitation in my game. Now i am going to add the score in this game. I have use this code to do this task.....</p>
  
  <pre><code>else if(win)
  {
  long end = System.currentTimeMillis();
  long time=end-startTime;
  JOptionPane.showMessageDialog(null, time);
  //System.exit(0);
  //g.drawImage(m.getWinn(), 32, 32, null);
  //JOptionPane.showMessageDialog(this, "Winner");
  }
  </code></pre>
  
  <p>here the JOptionPane show the time continuously. how can i show only one time or a winning message like "Your Score : 3450"</p>