java - How to make a image when go offset a window, appear at the other side? -
i know question bit confused, in java, want to, example, when image go less 0 x of panel, appear smoothly @ side, loop.
i'm bit newbie @ hehe, dont have enought reputation post images, there ya go link.
http://i.stack.imgur.com/gwzno.png
public void move(){ x += dx; y += dy; if(x + dx < 0) dx = 0; if(y + dy < 0) dy = 0; if(x + dx > getwidth()) dx = 0; if(y + dy > getheight()) dy = 0; } this movement of word's method.
Comments
Post a Comment