开发者

Ui Applicatiopn class use in other class

开发者 https://www.devze.com 2023-01-05 17:48 出处:网络
(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

(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");
}

}

0

精彩评论

暂无评论...
验证码 换一张
取 消