for (Enumeration e = entity.getWeapons(); e.hasMoreElements(); ) { Mounted m = (Mounted)e.nextElement();
for (Mounted m : entity.getWeaponList()) {
    private void setupRapidfireMGs() {        GridBagLayout gbl = new GridBagLayout();        panRapidfireMGs.setLayout(gbl);        GridBagConstraints gbc = new GridBagConstraints();                int row = 0;        for (Enumeration e = entity.getWeapons(); e.hasMoreElements(); ) {            Mounted m = (Mounted)e.nextElement();            WeaponType wtype = (WeaponType)m.getType();            if (!wtype.hasFlag(WeaponType.F_MG)) {                continue;            }             gbc.gridy = row++;            RapidfireMGPanel rmp = new RapidfireMGPanel(m);            gbl.setConstraints(rmp, gbc);            panRapidfireMGs.add(rmp);            m_vMGs.addElement(rmp);        }    }