I am trying to move a image across a jpanel but a for loop is not working. what method allows you to move a image icon. It shows up but doesn't move when i tried everything.
public class Picture extends JPanel implements Runnable
{
public Picture()
{
}//constructor
public void paintComponent(Graphics g)
{
super.paintComponent(g);
//aPic.paintIcon(this,g,xloc,yloc);
g.draw(aPic,100,20,this);
}//paint
public void run()
{
this.repaint();
}//run
}