更新时间:2022-11-21 18:52:38
当你创建按钮时,你应该在某个地方保留它的引用,这样你就可以测试它在处理程序中的哪个按钮。
When you create the button you should keep its reference somewhere so you can test which button it is in the handler.
Button FoodButton = new Button("DoIt")
Button DrinkButton = new Button("DoIt")