This example is the implementation of the example shown in this explanation using a finite state machine to manage ""not so simple" graphic user interface...