How to connect button listener in javaFx

前端 未结 2 1755
别那么骄傲
别那么骄傲 2021-01-29 08:59

The question seems simple, but there is a specific way I have to implement my code that is causing confusion. So in step #3 I need to register the source object with the event h

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-29 09:50

    to register ButtonHandler with btn1 as pointed out by @c0der btn1.setOnAction(new ButtonHandler());

提交回复
热议问题