title: Animation with AffineTransform
body: <p>i need help with using AffineTransform translate to create simple animation. </p>
  
  <p>Basically i have imported a pic and i've been trying to use affinetransform to create simple shaking animation for the picture (the picture will continuously moving up and down a little bit, non stop). </p>
  
  <p>While i appreciate if there's some other simple way, but i need to use affinetransform in this one.</p>
  
  <p>What function should i use for delaying? have been tried using timer but still failed due to my lack of understanding. Extremely simple code example will help, thanks!</p>
  
  <pre><code>Public void paint(Graphics g){
      super.paint(g);
      Graphics2D gpcs= (Graphics2D) g;
  
  
      gpcs.drawImage(logo, 0, 40, 250, 75, null);
  
      AffineTransform at = new AffineTransform(); 
      at.translate(0, 10);
      gpcs.setTransform(at);
  }
  </code></pre>