2010-06-24 58 views
0

包裝時包裝 ,當然在模擬器上錯誤在BlackBerry JDE

警告!沒有入口點找到 警告!MIDlet類不是公共

的應用程序不工作,當我得到這些警告請注意,主要類是公開的。 有什麼想法?

回答

0

你應該從Hello world例子開始。它會給你一個基本的想法如何開始寫一個BB應用程序。

package com.rim.samples.helloworld; 
import net.rim.device.api.ui.UiApplication; 
import net.rim.device.api.ui.component.*; 
import net.rim.device.api.ui.container.MainScreen; 
public class HelloWorld extends UiApplication 
{ 
public static void main(String[] args) 
{ 
HelloWorld theApp = new HelloWorld(); 
theApp.enterEventDispatcher(); 
} 
public HelloWorld() 
{ 
pushScreen(new HelloWorldScreen()); 
} 
} 
final class HelloWorldScreen extends MainScreen 
{ 
public HelloWorldScreen() 
{ 
super(); 
LabelField title = new LabelField("HelloWorld Sample", 
LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH); 
setTitle(title); 
add(new RichTextField("Hello World!")); 
} 
public boolean onClose() 
{ 
Dialog.alert("Goodbye!"); 
System.exit(0); 
return true; 
} 
}