O'Reilly logo

BlackBerry Java Application Development by Bill Foust

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - expanding Hansel

  1. The HanselMainScreen will need to be updated to include some new fields and menu items to support the new functionality. The first step is to add the data members to the MainScreen class. These are primarily the screen fields to display the new data. The listener will be described in more detail later.
    protected CalcDistanceLocationListener _CalcListener = null;
    protected RichTextField _EndLocation;
    protected RichTextField _StartLocation;
    protected RichTextField _Distance;
    protected RichTextField _Bearings;
    
  2. You'll also need a couple of new menu items, so add these menu items to the MainScreen class.
    protected MenuItem _ResetAction = new MenuItem("Clear Start Location" , 100000, 10) { public void run() { if (_CalcListener ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required