if (en instanceof Tank) {
if (en instanceof Tank || en instanceof GunEmplacement) {
    public void displaySlots() {        int loc = locList.getSelectedIndex();        slotList.removeAll();        for (int i = 0; i < en.getNumberOfCriticals(loc); i++) {            final CriticalSlot cs = en.getCritical(loc, i);            StringBuffer sb = new StringBuffer(32);            if(cs == null) {                sb.append("---"); //$NON-NLS-1$            } else {                switch(cs.getType()) {                case CriticalSlot.TYPE_SYSTEM :                    sb.append(cs.isDestroyed() ? "*" : "") //$NON-NLS-1$ //$NON-NLS-2$                        .append(cs.isBreached() ? "x" : ""); //$NON-NLS-1$ //$NON-NLS-2$                    // Protomechs have different systme names.                    if ( en instanceof Protomech ) {                        sb.append(Protomech.systemNames[cs.getIndex()]);                    } else {                        sb.append(((Mech)en).getSystemName(cs.getIndex()));                    }                    break;                case CriticalSlot.TYPE_EQUIPMENT :                    Mounted m = en.getEquipment(cs.getIndex());                    sb.append(cs.isDestroyed() ? "*" : "").append(cs.isBreached() ? "x" : "").append(m.getDesc()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$                    if (m.getType().hasModes()) {                        sb.append(" (").append(m.curMode().getDisplayableName()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$                    }                    break;                }            }            slotList.add(sb.toString());        }        if (en instanceof Tank) {            if (en.hasTargComp()) {                Enumeration equip = en.getEquipment();                while (equip.hasMoreElements()) {                    Mounted m = (Mounted)equip.nextElement();                    if (m.getType() instanceof MiscType &&                         m.getType().hasFlag(MiscType.F_TARGCOMP) ) {                        StringBuffer sb = new StringBuffer(32);                        sb.append(m.isDestroyed() ? "*" : "").append(m.isBreached() ? "x" : "").append(m.getDesc()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$                        if (m.getType().hasModes()) {                            sb.append(" (").append(m.curMode().getDisplayableName()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$                        }                        slotList.add(sb.toString());                                                                    }                                    }            }        }    }