2011-04-25 8 views
0

나는 Advance Black Berry 6 Development라는 책을 가지고 있습니다. MIDlet 예제를 사용할 수 있었지만 CLDC 프로그램의 첫 번째 예제는 사용할 수 없었습니다. 코드에 도달하지 못하는 것 같아요. 앱을 실행하면 빈 화면이 나타납니다. 중단 점을 넣으려고했지만 절대로 벗어나지 않았습니다.안녕하세요 세상을 쓰려고합니다. CLDC blackberry program

여기에 코드를입니다

package test.org; 
import net.rim.device.api.ui.UiApplication; 
import net.rim.device.api.ui.component.*; 
import net.rim.device.api.ui.container.*; 

public class cHelloUniverses extends UiApplication{ 


    public static void main(String[] args) 
    { 
     (new cHelloUniverses()).start(); 
    } 


    public void start() 
{ 
    MainScreen main = new MainScreen(); 
    LabelField label= new LabelField("Hello Ted"); 
    main.add(label); 

    UiApplication app = UiApplication.getUiApplication(); 
    app.pushScreen(main); 
    app.enterEventDispatcher(); 

} 


} 

답변

0

이와 시작() 메서드를 대체합니다

public void start() 
{ 
    MainScreen main = new MainScreen(); 
    LabelField label= new LabelField("Hello Ted"); 
    main.add(label); 

    this.pushScreen(main); 
    this.enterEventDispatcher(); 

} 
+0

안녕하세요, 여전히 자바를 llearning, 감사합니다. –