this.add(tmp);
for (int i = 0; i < functions.length; i++) {
if (!functions[i].equals("Pilot") && !functions[i].equals("-no function-")) {
final int k = i;
tmp = new JMenuItem(functions[i]);
tmp.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String oC = selectedPlane.getActiveController();
String nC = functions[k];
selectedPlane.setActiveController(nC);