How to move the image inside the JApplet in vertical line?
问题 I have displayed an image(ball) inside the JApplet, now I want the image to move in a vertical way (up and down). The problem is I don't know how to do it. Could someone has an idea about this matter? 回答1: You need to set the position of that image to some calculated value (means you caculate the vertical position using time, speed and maybe other restrictions). How you'd set that position depends on how you draw the image. Example, based on drawing in the applet's (or a nested component's)