a gui class that handles events is added.