title: How can I move image slowly?
body: <p>I want to move Images slowly.But drawImage() method only takes int values.Is there any method to move pictures slowly.I want to make ground move to the left a little bit slowly. </p>
  
  <pre><code>import java.awt.Graphics;
  import java.awt.Image;
  import java.awt.Toolkit;
  
  import javax.swing.JPanel;
  
  @SuppressWarnings("serial")
  public class Board extends JPanel {
  
  private Image ground;
  private Image city;
  private int x = 0;
  
  
  public Board() {
      ground = Toolkit.getDefaultToolkit().getImage("Resources\\ground2.png");
      city = Toolkit.getDefaultToolkit().getImage("Resources\\background2.png");
  }
  
  public void paint(Graphics g){
      super.paint(g);
      g.drawImage(ground, x--, 500, 600, 200, this);
      g.drawImage(ground, x + 600, 500, 600, 200, this);
      repaint();
      g.drawImage(city, 0, 0, 600, 500, this);
  
      if(x == -600){
          x = 0;
      }
  }
  }
  </code></pre>