public void updateLights() {
   boolean allOk = setIconStatus(modelLight, p.greenLight(false) ? greenLight : redLight);
   boolean speciesOK = (sb2.greenLight(false));
   boolean trackOK = sp2.greenLight(false);
   allOk = setIconStatus(speciesLight, speciesOK ? greenLight : redLight) && allOk;
   allOk =
       setIconStatus(
               foodLight,
               (speciesOK) ? (ftd.greenLight(false) ? greenLight : redLight) : greyLight)
           && allOk;
   allOk = setIconStatus(trackLight, trackOK ? greenLight : redLight) && allOk;
   allOk =
       setIconStatus(
               pmLight,
               (trackOK && speciesOK) ? (pm.greenLight(false) ? greenLight : redLight) : greyLight)
           && allOk;
   boolean colInitOK = icp.greenLight(false);
   allOk = setIconStatus(colInitLight, colInitOK ? greenLight : redLight) && allOk;
   allOk =
       setIconStatus(
               initLight,
               (trackOK & speciesOK & colInitOK)
                   ? (pi.greenLight(false) ? greenLight : redLight)
                   : greyLight)
           && allOk;
   allOk = setIconStatus(closureLight, (cd.greenLight(false) ? greenLight : redLight)) && allOk;
   allOk =
       setIconStatus(
               chemRecycleLight,
               trackOK ? (cr.greenLight(false) ? greenLight : redLight) : greyLight)
           && allOk;
   if (NOC_Mode)
     allOk =
         setIconStatus(
                 vddLight, trackOK ? (vdd.greenLight(false) ? greenLight : redLight) : greyLight)
             && allOk;
   allOk =
       setIconStatus(
               eventsLight, trackOK ? (ep.greenLight(false) ? greenLight : redLight) : greyLight)
           && allOk;
   allOk =
       setIconStatus(
               outputLight,
               (speciesOK && trackOK)
                   ? (od2.greenLight(false) ? greenLight : redLight)
                   : greyLight)
           && allOk;
   allOk =
       setIconStatus(
               runLight, (!allOk) ? greyLight : (rp.greenLight(false) ? greenLight : redLight))
           && allOk;
   setIconStatus(lastPage, yellowLight);
 }
 public boolean leavePage(JLabel j) {
   if (lastPage == trackLight) {
     sp2.leavePage();
     return true;
   } else if (lastPage == modelLight) {
     sc.setVisible(true);
     return true;
   } else if (lastPage == initLight) {
     if (j == null) {
       pi.checkAgentsExist();
       return true;
     } else if (!pi.checkAgentsExist()) {
       return false;
     }
   }
   return true;
 }