0

I got the book Advance Black Berry 6 Development. I was able to get the midlet example to work, but not the first example for a CLDC program. It seems like it never gets to the code and when I run the app I get a blank white screen. I tried to put a break point but it never went off.

Here is the code

package test.org;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;

public class cHelloUniverses extends  UiApplication{


    public static void main(String[] args)
     {
         (new cHelloUniverses()).start();
     }


    public void start()
 {
     MainScreen main = new MainScreen();
     LabelField label= new LabelField("Hello Ted");
     main.add(label);

     UiApplication app = UiApplication.getUiApplication();
     app.pushScreen(main);
     app.enterEventDispatcher();

 }


}
Michael Donohue
  • 11,776
  • 5
  • 31
  • 44
Ted pottel
  • 6,869
  • 21
  • 75
  • 134

1 Answers1

0

Replace your start() method with this:

public void start()
 {
     MainScreen main = new MainScreen();
     LabelField label= new LabelField("Hello Ted");
     main.add(label);

     this.pushScreen(main);
     this.enterEventDispatcher();

 }
Vicente Plata
  • 3,370
  • 1
  • 19
  • 26