public void controlEvent(ControlEvent theEvent) {

    if (theEvent.isGroup()) {
      // an event from a group e.g. scrollList
      // println(theEvent.group().value()+" from "+theEvent.group());


      if (theEvent.isGroup() && theEvent.getName().equals("StationDepart")) {

        AreaDepart = new ControlP5(this);

        AreaDepart.addTextfield("Depart").setPosition(50, 800).setSize(200, 40).setFocus(false)
            .setColor(color(255, 0, 0)).setText("Station " + theEvent.group().value());
        idDepart = (int) theEvent.group().value();
      }

      if (theEvent.isGroup() && theEvent.getName().equals("StationArrivee")) {

        AreaArrivee = new ControlP5(this);

        AreaArrivee.addTextfield("Arrivee").setPosition(50, 900).setSize(200, 40)
            .setColor(color(255, 0, 0)).setText("Station " + theEvent.group().value());


        idArrivee = (int) theEvent.group().value();
      }

    }

  }