if (wtype.hasFlag(WeaponType.F_MG)) { gbc.gridy = row++; RapidfireMGPanel rmp = new RapidfireMGPanel(m); gbl.setConstraints(rmp, gbc); panRapidfireMGs.add(rmp); m_vMGs.addElement(rmp); }
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);
    private void setupRapidfireMGs() {        GridBagLayout gbl = new GridBagLayout();        panMunitions.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)) {                gbc.gridy = row++;                RapidfireMGPanel rmp = new RapidfireMGPanel(m);                                gbl.setConstraints(rmp, gbc);                panRapidfireMGs.add(rmp);                m_vMGs.addElement(rmp);            }        }    }