use lambda expressions for gui class