> Make images scroll up the screen in Java?

Make images scroll up the screen in Java?

Posted at: 2014-12-18 
Okay, so I have a couple of images which I want to make scroll up the screen automatically when I press "run" in eclipse/

I'm using Swing and have created

Image picture;

Image picture = 500; (height of box is 400)

in my paint method I have:

g.drawImage(picture, 0, pictureY, this);

I have a Boolean run = true

my constructor calls a method called "init()"

in that constructor I have:

public void init(){

while(run == true){

pictureY = pictureY - 10;

}

}

When I run the program the image just stays put, it doesn't move at all!

would anybody be able to provide help on why this isn't working or maybe show me a better way of how to do it

the image is supposed to keep moving upwards

thanks