BasicAnimation

Retired DISLab
Swpark (토론 | 기여) 사용자의 2014년 1월 26일 (일) 09:14 버전
(비교) ← 이전 판 | 현재 판 (비교) | 다음 판 → (비교)
이동: 둘러보기, 찾기
import acm.program.*;
import acm.graphics.*;
 
public class BasicAnimation extends GraphicsProgram {
 
    public void run() {
        GRect rect = new GRect(72, 72); 
        add(rect,0,36); 
        while (true) {
            rect.move(1,1);
            pause(8);
        }
    }
 
    public static void main(String[] args) {
        String[] newArgs = new String[args.length + 1];
        System.arraycopy(args, 0, newArgs, 0, args.length);
        newArgs[args.length] = "code=" + new SecurityManager() {
            public String className() {
                return this.getClassContext()[1].getCanonicalName();
            }
        }.className();
        GraphicsProgram.main(newArgs);
    }
}
개인 도구
이름공간
변수
행위
둘러보기
구성원
연구
연구실
기타
도구모음
인쇄/내보내기