title: Using multiple timers in a Java application with animation
body: <p>I'm writing a Java Application that will side scroll sheet music across the screen and then when it crosses a middle line, it will play the note(s).</p>
  
  <p>It will have a variable speed based on the beats per minute. </p>
  
  <p>Every quarter of a beat I need to have a "tick" function that will get the next note (if any) and start its animation. To calculate this tick I have a function 60000ms/bpm/4. This will be separate from the animation timer, because the repaint should probably be called at some constant rate.</p>
  
  <p>So I'm thinking I need Util Timer for the "ticks" and a swing timer for the JPanel and drawing in the paintComponent() method.</p>
  
  <p>My question is: What would be the best practice for accomplishing this? I've done a fair amount of Java programming, but no Swing or animations so I would like to learn the best way to do this.</p>
  
  <p>Thanks</p>
  
  <p>Nate</p>