return menu;
}
private MenuItem createModeMenuItem(Mounted mounted, int position) {
MenuItem item = new MenuItem();
EquipmentMode mode = mounted.getType().getMode(position);
if (mode.equals(mounted.curMode())) {
item.setLabel("* " + mode.getDisplayableName());
} else {
item.setLabel(mode.getDisplayableName());
}
item.setActionCommand(Integer.toString(position));
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
int position = Integer.parseInt(e.getActionCommand());
int weaponNum = gui.mechD.wPan.getSelectedWeaponNum();
Mounted mounted = myEntity.getEquipment(weaponNum);