(public class GPSDemo extends UiApplication) its a class name i want to use this class in this code. i am make a object of this class but throw the exception
here is the place where we use it popRunnable = new Runnable() { public void run() { 开发者_如何学JAVA /*StartUpScreen mainScreen = new StartUpScreen(); pushScreen(mainScreen); */
GPSDemo mainScreen =new GPSDemo();
// mainScreen.enterEventDispatcher();
//pushScreen(mainScreen);
}
};
who we use it
UiApplication and MainScreen are different things
public class Main extends UiApplication{
Main() {
pushScreen(new GPSDemo());
}
public static void main(String args[]) {
Main app = new Main();
app.enterEventDispatcher();
}
class GPSDemo extends MainScreen {
GPSDemo() {
this.setTitle("GPSDemo");
}
}
精彩评论