나는 방법을 가지고 AnimationThread은 실행 가능한 구현하고 생성자가자바 "화재 및 잊어 버려"스레드
public static void startAnimation() {
new AnimationThread().run();
}
: 내가 애플릿의 초기화() 메소드에서 호출 오전
public AnimationThread() {
new Thread(this, "Animation Thread");
EventQueue.setAnimationCounter(0);
alive = true;
}
값을 반환하지 않으므로 중단됩니다. 이 스레드를 시작하고 init() 메소드를 완료하여 애플릿을 시작할 수있는 방법이 있습니까?
감사
스레드()를 시작해야합니다. 'run()'호출은 다른 메소드와 마찬가지로 현재 스레드에서 실행되며 완료 될 때만 리턴합니다. –