Constructing the User Interface with Statecharts