tags:

views:

21

answers:

1

(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() { /*StartUpScreen mainScreen = new StartUpScreen(); pushScreen(mainScreen); */

                             GPSDemo mainScreen =new GPSDemo();

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

who we use it

A: 

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

}

oxigen