// you type this to generate The Java source bubblegum
// to create the anonymous inner class and hook it
// up for one listener. It generates about half
// a page per listener.

s.addListener( "JButton",
               "startScan",
               "sched.startScan();",
               "start scanning" );

// Here is the core of what it generates.
// It generates much more bubblegum than I show here.
// here is the core of the generated output.

/**
* Create and attach Listeners
*/
protected void hookListeners()
   {
   // super.hookListeners();

   hookChangeButton(); // to startCameraSelectFrame();
   hookStartScanButton(); // to sched.startScan();
   hookStopScanButton(); // to sched.stopScan();
   hookHistoryMenuItem(); // to startHistoryFrame();
   hookConfigMenuItem(); // to startConfigFrame();

   hookRequestSpeed(); // to requestNewSpeed();
   hookCameraButtonPanel(); // to setRequestedCameraId( cameraId, true /* stop scan */ );
   hookPTZButtonPanel(); // to sendPTZCommand ( buttonCode );

   } // end hookListeners