for ( int i = 0; i < loc ; i++ ) {   armor = proto.getArmor(i, false); if ( armor < 0 ) { armor = 0; } internal = proto.getInternal(i); if ( internal < 0 ) { internal = 0; }   sectionLabels[i].setValue( proto.getLocationName(i) ); armorLabels[i].setValue( Integer.toString(armor) ); if ( armor + internal == 0 ) { internalLabels[i].setValue( Messages.getString("ProtomechMapSet.Destroyed") ); } else { internalLabels[i].setValue( Integer.toString(internal) ); }  }
for (int i=0; i<loc; i++) { armor = proto.getArmor(i); internal = proto.getInternal(i); armorLabels[i].setValue(new Integer(armor).toString()); internalLabels[i].setValue(new Integer(internal).toString()); sectionLabels[i].setValue(proto.getLocationAbbr(i)); }
    public void setEntity(Entity entity){        Protomech proto = (Protomech) entity;        int armor = 0;        int internal =0;        int loc = proto.locations();        // Not all Protomechs have a Main Gun.        if ( Protomech.NUM_PMECH_LOCATIONS == loc ){            sectionLabels[Protomech.NUM_PMECH_LOCATIONS - 1].setVisible(true);            armorLabels[Protomech.NUM_PMECH_LOCATIONS - 1].setVisible(true);            internalLabels[Protomech.NUM_PMECH_LOCATIONS - 1].setVisible(true);        } else{            sectionLabels[Protomech.NUM_PMECH_LOCATIONS - 1].setVisible(false);            armorLabels[Protomech.NUM_PMECH_LOCATIONS - 1].setVisible(false);            internalLabels[Protomech.NUM_PMECH_LOCATIONS - 1].setVisible(false);        }        // Set the armor and internal labels for each of the sections.        for ( int i = 0; i < loc ; i++ ) {            // Handle ARMOR_NA, ARMOR_DOOMED< and ARMOR_DESTROYED.            armor = proto.getArmor(i, false);            if ( armor < 0 ) {                armor = 0;            }                internal = proto.getInternal(i);            if ( internal < 0 ) {                internal = 0;            }            // Now set the labels.            sectionLabels[i].setValue( proto.getLocationName(i) );            armorLabels[i].setValue( Integer.toString(armor) );                if ( armor + internal == 0 ) {                    internalLabels[i].setValue( Messages.getString("ProtomechMapSet.Destroyed") ); //$NON-NLS-1$                } else {                    internalLabels[i].setValue( Integer.toString(internal) );                }        } // Handle the next location.    }