title: Java swing Timer loop slows down
body: <p>So, I'm trying to create a small game using Swing in Java. The game loop I created uses a javax.swing Timer.
  This timer (normally) calls a loop every 5ms.</p>
  
  <pre><code>Timer tm = new Timer(5, this);
  tm.start();
  
  @Override
  public void actionPerformed(ActionEvent e) {
      game.tick();
      repaint();
      revalidate();
  }
  </code></pre>
  
  <p>My code can be pretty heavy because it contains quite alot of for-loops, so I'm not surprised this isn't actualy running in a loop every 5ms.
  Instead, it flows around at a pretty stable 160fps, at least it does on my computer. The moment I tried my game on my brother's computer (less RAM), it at first ran at the same 160fps, but after about 2 minutes the frames drop to a stable 60fps.</p>
  
  <p>I personally find it really weird the frames drop this much at the same time-interval and stays stable like that for the rest of the time.</p>
  
  <p>If anyone encountered a similar problem and knows what is causing it, please let me know. Thanks in advance.
  ~Krikke</p>