title: Java does something for 15 seconds and then something else 5 sec after
body: <p>So I wanted to implement a timer that would allow me to draw a red square every 15 seconds and then after it was there for 5 seconds make the square disappear from the canvas. It is a trap in the game that I want to implement, but am not sure how the timer would work.</p>
  
  <p>I figured I need 2 timers one for the appearing, and the second for disappearing(?) but am not sure how to sync them so that the square appears and stays at a position of the canvas for 5 seconds in 15 second periods either. (it might even be better to have it in a random 15-20 second increment of time). It's important that this item disappears after I turn the canvas from say red to white.</p>
  
  <p>How does calling a timer in a function work? Do I need a new class for this? Is an instance variable enough?</p>