title: JFrame not updating when I call repaint()
body: <p>I have a chess game I'm trying to make, and I'm trying to call the <code>repaint()</code> method on one of my JFrames in the game loop. This particular JFrame shows the total kills for each player. I'm pretty sure <code>repaint()</code> is actually being called, but for some reason it doesn't seem to be updating my JLabels correctly, which are supposed to hold the number of kills values for each player.</p>
  
  <p>Here's my code for the custom JFrame extension class which houses the JLabels representing the kills.</p>
  
  <pre><code>private ChessGame game;
  private JPanel killsPanel;
  private String p1kills;
  private String p2kills;
  private JLabel kills;
  private JLabel p1, p2;
  private JLabel p1NumKills = new JLabel();
  private JLabel p2NumKills = new JLabel();
  
  
  //the player's kill values are increasing and registering, just not within the jlabels representing them
  public KillsFrame(ChessGame game){
      this.game = game;
      killsPanel = new JPanel(new MigLayout("", "[center][right][left][c]", "[top][center][b]"));
      kills = new JLabel("KILLS");
      p1 = new JLabel(game.getCurrentPlayer().getName() + " - ");
      p2 = new JLabel(game.getOtherPlayer().getName() + " - ");
  
      //this is the part that should be working but isn't.
      //p1kills and p2kills aren't being updated or something.
      p1kills = "" + game.getCurrentPlayer().getKills();
      p2kills = "" + game.getOtherPlayer().getKills();
      p1NumKills.setText(p1kills);
      p1NumKills.setText(p2kills);
  
      killsPanel.add(kills, "span");
      killsPanel.add(p1);
      killsPanel.add(p1NumKills, "wrap");
      killsPanel.add(p2);
      killsPanel.add(p2NumKills, "wrap");
  
      killsPanel.setBackground(Color.lightGray);
      add(killsPanel);
      pack();
      setTitle("Scoreboard");
      setDefaultCloseOperation(DISPOSE_ON_CLOSE);
      setResizable(true);
      setVisible(true);
      setLocationRelativeTo(null);
  }
  </code></pre>
  
  <p>Then I just call this frame's repaint() in a main method in a different class: </p>
  
  <pre><code>public static void main(String[] args) throws InterruptedException {
  
      JFrame gameFrame = new ChessMain();
      gameFrame.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
      gameFrame.pack();
      gameFrame.setResizable(true);
      gameFrame.setLocationRelativeTo(null);
      gameFrame.setVisible(true); 
      gameFrame.setTitle("Chess X");
  
      LoginFrame loginFrame = new LoginFrame(((ChessMain) gameFrame).getGame());
  
      System.out.println(((ChessMain) gameFrame).getGame().toString());
      System.out.println(((ChessMain) gameFrame).getGame().currentPlayer.getName()+ ", it's your turn.");
  
      //this is what creates the kills frame.
      KillsFrame kf = new KillsFrame(((ChessMain) gameFrame).getGame());
  
      while(true){
  
          ((ChessMain) gameFrame).getGame().run();
          kf.repaint();//*************************************
          Thread.sleep(1);
  
      }
  
  }
  </code></pre>
  
  <p>Any and all help is greatly appreciated.</p>