【问题标题】:Ui Applicatiopn class use in other classUi 应用程序类在另一个类中使用
【发布时间】:2011-03-10 00:28:33
【问题描述】:

(public class GPSDemo extends UiApplication) 它的类名 我想在这段代码中使用这个类。我是这个类的一个对象,但抛出异常

这里是我们使用它的地方 popRunnable = new Runnable() { 公共无效运行() { /*StartUpScreen mainScreen = new StartUpScreen(); 推屏(主屏); */

                             GPSDemo mainScreen =new GPSDemo();

                            // mainScreen.enterEventDispatcher();
                             //pushScreen(mainScreen);  
                    }
             };

我们使用它的人

【问题讨论】:

    标签: blackberry


    【解决方案1】:

    UiApplication 和 MainScreen 是不同的东西

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

    }

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-12-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-24
      相关资源
      最近更新 更多