m_chAmmo.setEnabled(false);
    public void displaySelected() {        // short circuit if not selected        if(weaponList.getSelectedIndex() == -1) {            m_chAmmo.removeAll();            m_chAmmo.setEnabled(false);            wNameR.setText("");            wHeatR.setText("--");            wDamR.setText("--");            wMinR.setText("---");            wShortR.setText("---");            wMedR.setText("---");            wLongR.setText("---");            wExtR.setText("---");            return;        }        Mounted mounted = (Mounted)weapons.elementAt(weaponList.getSelectedIndex());        WeaponType wtype = (WeaponType)mounted.getType();        // update weapon display        wNameR.setText(mounted.getDesc());        wHeatR.setText(wtype.getHeat() + "");        if(wtype.getDamage() == WeaponType.DAMAGE_MISSILE) {            wDamR.setText("Missile");        } else if(wtype.getDamage() == WeaponType.DAMAGE_VARIABLE) {            wDamR.setText("Variable");        } else if(wtype.getDamage() == WeaponType.DAMAGE_SPECIAL) {            wDamR.setText("Special");        } else if(wtype.getDamage() == WeaponType.DAMAGE_ARTILLERY) {            StringBuffer damage = new StringBuffer();            damage.append( Integer.toString(wtype.getRackSize()) )                .append( '/' )                .append( Integer.toString(wtype.getRackSize()/2) );            wDamR.setText( damage.toString() );        } else {            wDamR.setText( Integer.toString(wtype.getDamage()) );        }        // update range        int shortR   = wtype.getShortRange();        int mediumR  = wtype.getMediumRange();        int longR    = wtype.getLongRange();        int extremeR = wtype.getExtremeRange();        if ( Entity.LOC_WET == entity.getLocationStatus(mounted.getLocation()) ) {            shortR = wtype.getWShortRange();            mediumR = wtype.getWMediumRange();            longR = wtype.getWLongRange();            extremeR = wtype.getWExtremeRange();        }        if(wtype.getMinimumRange() > 0) {            wMinR.setText(Integer.toString(wtype.getMinimumRange()));        } else {            wMinR.setText("---");        }        if(shortR > 1) {            wShortR.setText("1 - " + shortR);        } else {            wShortR.setText("" + shortR);        }        if(mediumR - shortR > 1) {            wMedR.setText((shortR + 1) + " - " + mediumR);        } else {            wMedR.setText("" + mediumR);        }        if(longR - mediumR > 1) {            wLongR.setText((mediumR + 1) + " - " + longR);        } else {            wLongR.setText("" + longR);        }        if(extremeR - longR > 1) {            wExtR.setText((longR + 1) + " - " + extremeR);        } else {            wExtR.setText("" + extremeR);        }        // Update the range display to account for the weapon's loaded ammo.        if ( null != mounted.getLinked() ) {            AmmoType atype = (AmmoType) mounted.getLinked().getType();            updateRangeDisplayForAmmo( atype );        }        // update ammo selector        boolean bOwner = (client.getClient().getLocalPlayer() == entity.getOwner());        m_chAmmo.removeAll();        if (wtype.getAmmoType() == AmmoType.T_NA || !bOwner) {            m_chAmmo.setEnabled(false);        } else if (wtype.hasFlag(WeaponType.F_ONESHOT)) {            if (mounted.getLinked().getShotsLeft() == 1) {                m_chAmmo.add( formatAmmo(mounted.getLinked()) );                m_chAmmo.setEnabled(true);            } else {                m_chAmmo.setEnabled(false);            }        } else {            m_chAmmo.setEnabled(true);            vAmmo = new Vector();            int nCur = -1;            int i = 0;            for (Enumeration j = entity.getAmmo(); j.hasMoreElements();) {                Mounted mountedAmmo = (Mounted)j.nextElement();                AmmoType atype = (AmmoType)mountedAmmo.getType();                if (mountedAmmo.isAmmoUsable() &&                    atype.getAmmoType() == wtype.getAmmoType() &&                    atype.getRackSize() == wtype.getRackSize()) {                    vAmmo.addElement(mountedAmmo);                    m_chAmmo.add( formatAmmo(mountedAmmo) );                    if (mounted.getLinked() == mountedAmmo) {                        nCur = i;                    }                    i++;                }            }            if (nCur == -1) {                m_chAmmo.setEnabled(false);            }            else {                m_chAmmo.select(nCur);            }        }    }